]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
regulator: Convert tps6524x to get_voltage_sel
authorAxel Lin <axel.lin@gmail.com>
Wed, 28 Mar 2012 11:46:39 +0000 (19:46 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Sun, 1 Apr 2012 10:59:37 +0000 (11:59 +0100)
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/regulator/tps6524x-regulator.c

index 3a4a1d550db01293dd94e650f6cec039c7ddf1dd..2a828a07386aee643cae63e88682eea361790ffe 100644 (file)
@@ -472,7 +472,7 @@ static int set_voltage_sel(struct regulator_dev *rdev, unsigned selector)
        return write_field(hw, &info->voltage, selector);
 }
 
-static int get_voltage(struct regulator_dev *rdev)
+static int get_voltage_sel(struct regulator_dev *rdev)
 {
        const struct supply_info *info;
        struct tps6524x *hw;
@@ -490,7 +490,7 @@ static int get_voltage(struct regulator_dev *rdev)
        if (WARN_ON(ret >= info->n_voltages))
                return -EIO;
 
-       return info->voltages[ret];
+       return ret;
 }
 
 static int set_current_limit(struct regulator_dev *rdev, int min_uA,
@@ -575,7 +575,7 @@ static struct regulator_ops regulator_ops = {
        .is_enabled             = is_supply_enabled,
        .enable                 = enable_supply,
        .disable                = disable_supply,
-       .get_voltage            = get_voltage,
+       .get_voltage_sel        = get_voltage_sel,
        .set_voltage_sel        = set_voltage_sel,
        .list_voltage           = list_voltage,
        .set_current_limit      = set_current_limit,