mirror of https://gitee.com/openkylin/linux.git
regulator: Fix setting selector in tps6524x set_voltage function
Don't assign the voltage to selector. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
This commit is contained in:
parent
fde7d9049e
commit
f03570cf17
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue