regulator: mc13xxx: Populate selector from mc13xxx_fixed_regulator_set_voltage
authorAxel Lin <axel.lin@gmail.com>
Fri, 13 Jul 2012 15:01:14 +0000 (23:01 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 28 Aug 2012 18:00:15 +0000 (11:00 -0700)
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>
drivers/regulator/mc13xxx-regulator-core.c

index d6eda28ca5d02dbf4f06498a7787d177304d03f0..8151889745e617f1b3c42c7d6bf5444a7b02c9ac 100644 (file)
@@ -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);