regulator: isl6271a: Use regulator_list_voltage_linear()
authorAxel Lin <axel.lin@gmail.com>
Wed, 16 May 2012 02:09:27 +0000 (10:09 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 16 May 2012 08:46:57 +0000 (09:46 +0100)
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/regulator/isl6271a-regulator.c

index 5caaf1f77541bbda482751e4b219f675c9de37ea..78cdc90e0a7ea88ecccca4d6069fa55d7dc3f253 100644 (file)
@@ -83,15 +83,10 @@ static int isl6271a_set_voltage(struct regulator_dev *dev,
        return err;
 }
 
-static int isl6271a_list_voltage(struct regulator_dev *dev, unsigned selector)
-{
-       return ISL6271A_VOLTAGE_MIN + (ISL6271A_VOLTAGE_STEP * selector);
-}
-
 static struct regulator_ops isl_core_ops = {
        .get_voltage    = isl6271a_get_voltage,
        .set_voltage    = isl6271a_set_voltage,
-       .list_voltage   = isl6271a_list_voltage,
+       .list_voltage   = regulator_list_voltage_linear,
 };
 
 static int isl6271a_get_fixed_voltage(struct regulator_dev *dev)
@@ -119,6 +114,8 @@ static const struct regulator_desc isl_rd[] = {
                .ops            = &isl_core_ops,
                .type           = REGULATOR_VOLTAGE,
                .owner          = THIS_MODULE,
+               .min_uV         = ISL6271A_VOLTAGE_MIN,
+               .uV_step        = ISL6271A_VOLTAGE_STEP,
        }, {
                .name           = "LDO1",
                .id             = 1,