Commit f03570cf authored by Axel Lin's avatar Axel Lin Committed by Mark Brown

regulator: Fix setting selector in tps6524x set_voltage function

Don't assign the voltage to selector.
Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment