diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-08-02 03:34:12 -0400 |
---|---|---|
committer | Liam Girdwood <lrg@slimlogic.co.uk> | 2011-08-08 12:15:09 -0400 |
commit | 0fcdb109a50afb8b26709175937ba3de9486770b (patch) | |
tree | 502c60472ec1923b93fe8c6b1987ded950754f58 /drivers/regulator/tps6507x-regulator.c | |
parent | dd32e11cdbc73e570f9fe7425fa820c97070a2c4 (diff) |
regulator: tps6507x: Remove num_voltages array
We can get n_voltages for each regulator from table_len of struct tps_info.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'drivers/regulator/tps6507x-regulator.c')
-rw-r--r-- | drivers/regulator/tps6507x-regulator.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/regulator/tps6507x-regulator.c b/drivers/regulator/tps6507x-regulator.c index bfffabc21eda..bdef70365f52 100644 --- a/drivers/regulator/tps6507x-regulator.c +++ b/drivers/regulator/tps6507x-regulator.c | |||
@@ -90,12 +90,6 @@ static const u16 LDO2_VSEL_table[] = { | |||
90 | 3000, 3100, 3200, 3300, | 90 | 3000, 3100, 3200, 3300, |
91 | }; | 91 | }; |
92 | 92 | ||
93 | static unsigned int num_voltages[] = {ARRAY_SIZE(VDCDCx_VSEL_table), | ||
94 | ARRAY_SIZE(VDCDCx_VSEL_table), | ||
95 | ARRAY_SIZE(VDCDCx_VSEL_table), | ||
96 | ARRAY_SIZE(LDO1_VSEL_table), | ||
97 | ARRAY_SIZE(LDO2_VSEL_table)}; | ||
98 | |||
99 | struct tps_info { | 93 | struct tps_info { |
100 | const char *name; | 94 | const char *name; |
101 | unsigned min_uV; | 95 | unsigned min_uV; |
@@ -598,7 +592,7 @@ int tps6507x_pmic_probe(struct platform_device *pdev) | |||
598 | 592 | ||
599 | tps->desc[i].name = info->name; | 593 | tps->desc[i].name = info->name; |
600 | tps->desc[i].id = i; | 594 | tps->desc[i].id = i; |
601 | tps->desc[i].n_voltages = num_voltages[i]; | 595 | tps->desc[i].n_voltages = info->table_len; |
602 | tps->desc[i].ops = (i > TPS6507X_DCDC_3 ? | 596 | tps->desc[i].ops = (i > TPS6507X_DCDC_3 ? |
603 | &tps6507x_pmic_ldo_ops : &tps6507x_pmic_dcdc_ops); | 597 | &tps6507x_pmic_ldo_ops : &tps6507x_pmic_dcdc_ops); |
604 | tps->desc[i].type = REGULATOR_VOLTAGE; | 598 | tps->desc[i].type = REGULATOR_VOLTAGE; |