From f72642cc134eafd0decfc3920bba7690d90e6034 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Fri, 6 Jul 2012 19:14:32 +0800 Subject: [PATCH] --- yaml --- r: 312630 b: refs/heads/master c: 4506c6d5ea5dddab562fd06398fd9b8d1681bbd0 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/regulator/aat2870-regulator.c | 16 +++------------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/[refs] b/[refs] index 211631d4d68d..ae84453a7057 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e76b9cc7b88b4807e129779ca36298c76486a06c +refs/heads/master: 4506c6d5ea5dddab562fd06398fd9b8d1681bbd0 diff --git a/trunk/drivers/regulator/aat2870-regulator.c b/trunk/drivers/regulator/aat2870-regulator.c index 06776ca945f2..6644e83076b4 100644 --- a/trunk/drivers/regulator/aat2870-regulator.c +++ b/trunk/drivers/regulator/aat2870-regulator.c @@ -33,8 +33,6 @@ struct aat2870_regulator { struct aat2870_data *aat2870; struct regulator_desc desc; - const int *voltages; /* uV */ - int min_uV; int max_uV; @@ -47,14 +45,6 @@ struct aat2870_regulator { u8 voltage_mask; }; -static int aat2870_ldo_list_voltage(struct regulator_dev *rdev, - unsigned selector) -{ - struct aat2870_regulator *ri = rdev_get_drvdata(rdev); - - return ri->voltages[selector]; -} - static int aat2870_ldo_set_voltage_sel(struct regulator_dev *rdev, unsigned selector) { @@ -111,7 +101,7 @@ static int aat2870_ldo_is_enabled(struct regulator_dev *rdev) } static struct regulator_ops aat2870_ldo_ops = { - .list_voltage = aat2870_ldo_list_voltage, + .list_voltage = regulator_list_voltage_table, .set_voltage_sel = aat2870_ldo_set_voltage_sel, .get_voltage_sel = aat2870_ldo_get_voltage_sel, .enable = aat2870_ldo_enable, @@ -119,7 +109,7 @@ static struct regulator_ops aat2870_ldo_ops = { .is_enabled = aat2870_ldo_is_enabled, }; -static const int aat2870_ldo_voltages[] = { +static const unsigned int aat2870_ldo_voltages[] = { 1200000, 1300000, 1500000, 1600000, 1800000, 2000000, 2200000, 2500000, 2600000, 2700000, 2800000, 2900000, @@ -132,11 +122,11 @@ static const int aat2870_ldo_voltages[] = { .name = #ids, \ .id = AAT2870_ID_##ids, \ .n_voltages = ARRAY_SIZE(aat2870_ldo_voltages), \ + .volt_table = aat2870_ldo_voltages, \ .ops = &aat2870_ldo_ops, \ .type = REGULATOR_VOLTAGE, \ .owner = THIS_MODULE, \ }, \ - .voltages = aat2870_ldo_voltages, \ .min_uV = 1200000, \ .max_uV = 3300000, \ }