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

regulator: lp8788-buck: Remove buck[1|2]_vout_addr array

The vout address for buck[1|2] can be easily calculated,
thus remote these arrays.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Milo Kim <milo.kim@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

authored by

Axel Lin and committed by
Mark Brown
e69995d3 eb758de6

+2 -12
+2 -12
drivers/regulator/lp8788-buck.c
··· 103 103 1950000, 2000000, 104 104 }; 105 105 106 - static const u8 buck1_vout_addr[] = { 107 - LP8788_BUCK1_VOUT0, LP8788_BUCK1_VOUT1, 108 - LP8788_BUCK1_VOUT2, LP8788_BUCK1_VOUT3, 109 - }; 110 - 111 - static const u8 buck2_vout_addr[] = { 112 - LP8788_BUCK2_VOUT0, LP8788_BUCK2_VOUT1, 113 - LP8788_BUCK2_VOUT2, LP8788_BUCK2_VOUT3, 114 - }; 115 - 116 106 static void lp8788_buck1_set_dvs(struct lp8788_buck *buck) 117 107 { 118 108 struct lp8788_buck1_dvs *dvs = (struct lp8788_buck1_dvs *)buck->dvs; ··· 225 235 lp8788_read_byte(buck->lp, LP8788_BUCK_DVS_SEL, &val); 226 236 idx = (val & LP8788_BUCK1_DVS_M) >> LP8788_BUCK1_DVS_S; 227 237 } 228 - addr = buck1_vout_addr[idx]; 238 + addr = LP8788_BUCK1_VOUT0 + idx; 229 239 break; 230 240 case BUCK2: 231 241 if (mode == EXTPIN) { ··· 248 258 lp8788_read_byte(buck->lp, LP8788_BUCK_DVS_SEL, &val); 249 259 idx = (val & LP8788_BUCK2_DVS_M) >> LP8788_BUCK2_DVS_S; 250 260 } 251 - addr = buck2_vout_addr[idx]; 261 + addr = LP8788_BUCK2_VOUT0 + idx; 252 262 break; 253 263 default: 254 264 goto err;