Skip to content

Commit

Permalink
regulator: Fix setting selector in tps6524x set_voltage function
Browse files Browse the repository at this point in the history
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
  • Loading branch information
AxelLin authored and broonie committed Mar 11, 2012
1 parent fde7d90 commit f03570c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/regulator/tps6524x-regulator.c
Expand Up @@ -481,7 +481,7 @@ static int set_voltage(struct regulator_dev *rdev, int min_uV, int max_uV,
if (i >= info->n_voltages)
i = info->n_voltages - 1;

*selector = info->voltages[i];
*selector = i;

return write_field(hw, &info->voltage, i);
}
Expand Down

0 comments on commit f03570c

Please sign in to comment.