Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Axel Lin and committed by
Liam Girdwood
0fcdb109 dd32e11c

+1 -7
+1 -7
drivers/regulator/tps6507x-regulator.c
··· 90 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 93 struct tps_info { 100 94 const char *name; 101 95 unsigned min_uV; ··· 592 598 593 599 tps->desc[i].name = info->name; 594 600 tps->desc[i].id = i; 595 - tps->desc[i].n_voltages = num_voltages[i]; 601 + tps->desc[i].n_voltages = info->table_len; 596 602 tps->desc[i].ops = (i > TPS6507X_DCDC_3 ? 597 603 &tps6507x_pmic_ldo_ops : &tps6507x_pmic_dcdc_ops); 598 604 tps->desc[i].type = REGULATOR_VOLTAGE;