提交 f03570cf 编写于 作者: A Axel Lin 提交者: Mark Brown

regulator: Fix setting selector in tps6524x set_voltage function

Don't assign the voltage to selector.
Signed-off-by: NAxel Lin <axel.lin@gmail.com>
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
上级 fde7d904
...@@ -481,7 +481,7 @@ static int set_voltage(struct regulator_dev *rdev, int min_uV, int max_uV, ...@@ -481,7 +481,7 @@ static int set_voltage(struct regulator_dev *rdev, int min_uV, int max_uV,
if (i >= info->n_voltages) if (i >= info->n_voltages)
i = info->n_voltages - 1; i = info->n_voltages - 1;
*selector = info->voltages[i]; *selector = i;
return write_field(hw, &info->voltage, i); return write_field(hw, &info->voltage, i);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册