Skip to content

Commit

Permalink
regulator: mc13xxx: Populate selector from mc13xxx_fixed_regulator_se…
Browse files Browse the repository at this point in the history
…t_voltage

This was missing until now and the underlying
_regulator_do_set_voltage is using this value when calling list_voltage.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Axel Lin authored and Mark Brown committed Aug 28, 2012
1 parent ad46ed1 commit 13407ea
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/regulator/mc13xxx-regulator-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,12 @@ int mc13xxx_fixed_regulator_set_voltage(struct regulator_dev *rdev, int min_uV,
__func__, id, min_uV, max_uV);

if (min_uV <= rdev->desc->volt_table[0] &&
rdev->desc->volt_table[0] <= max_uV)
rdev->desc->volt_table[0] <= max_uV) {
*selector = 0;
return 0;
else
} else {
return -EINVAL;
}
}
EXPORT_SYMBOL_GPL(mc13xxx_fixed_regulator_set_voltage);

Expand Down

0 comments on commit 13407ea

Please sign in to comment.