Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0fcdb109 authored by Axel Lin's avatar Axel Lin Committed by Liam Girdwood
Browse files

regulator: tps6507x: Remove num_voltages array



We can get n_voltages for each regulator from table_len of struct tps_info.

Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Acked-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
parent dd32e11c
Loading
Loading
Loading
Loading
+1 −7
Original line number Original line Diff line number Diff line
@@ -90,12 +90,6 @@ static const u16 LDO2_VSEL_table[] = {
	3000, 3100, 3200, 3300,
	3000, 3100, 3200, 3300,
};
};


static unsigned int num_voltages[] = {ARRAY_SIZE(VDCDCx_VSEL_table),
				ARRAY_SIZE(VDCDCx_VSEL_table),
				ARRAY_SIZE(VDCDCx_VSEL_table),
				ARRAY_SIZE(LDO1_VSEL_table),
				ARRAY_SIZE(LDO2_VSEL_table)};

struct tps_info {
struct tps_info {
	const char *name;
	const char *name;
	unsigned min_uV;
	unsigned min_uV;
@@ -598,7 +592,7 @@ int tps6507x_pmic_probe(struct platform_device *pdev)


		tps->desc[i].name = info->name;
		tps->desc[i].name = info->name;
		tps->desc[i].id = i;
		tps->desc[i].id = i;
		tps->desc[i].n_voltages = num_voltages[i];
		tps->desc[i].n_voltages = info->table_len;
		tps->desc[i].ops = (i > TPS6507X_DCDC_3 ?
		tps->desc[i].ops = (i > TPS6507X_DCDC_3 ?
		&tps6507x_pmic_ldo_ops : &tps6507x_pmic_dcdc_ops);
		&tps6507x_pmic_ldo_ops : &tps6507x_pmic_dcdc_ops);
		tps->desc[i].type = REGULATOR_VOLTAGE;
		tps->desc[i].type = REGULATOR_VOLTAGE;