Skip to content

Commit 0d2e820

Browse files
ccpalexlag-linaro
authored andcommitted
leds: lp8860: Write full EEPROM, not only half of it
I struggle to explain dividing an ARRAY_SIZE() by the size of an element once again. As the latter equals to 2, only the half of EEPROM was ever written. Drop the unexplainable division and write full ARRAY_SIZE(). Cc: [email protected] Fixes: 7a8685a ("leds: lp8860: Introduce TI lp8860 4 channel LED driver") Signed-off-by: Alexander Sverdlin <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
1 parent 40384c8 commit 0d2e820

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/leds/leds-lp8860.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ static int lp8860_init(struct lp8860_led *led)
265265
goto out;
266266
}
267267

268-
reg_count = ARRAY_SIZE(lp8860_eeprom_disp_regs) / sizeof(lp8860_eeprom_disp_regs[0]);
268+
reg_count = ARRAY_SIZE(lp8860_eeprom_disp_regs);
269269
for (i = 0; i < reg_count; i++) {
270270
ret = regmap_write(led->eeprom_regmap,
271271
lp8860_eeprom_disp_regs[i].reg,

0 commit comments

Comments
 (0)