mirror of
https://github.com/torvalds/linux.git
synced 2024-12-26 21:02:19 +00:00
leds: mc13783: Fix MC13892 keypad led access
Fix the register access shift argument calculation introduced with
commit a59ce6584d
("leds: leds-mc13783: Add MC34708 LED support")
and re-enable access to the "keypad" led for MC13892 MFC devices.
Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
This commit is contained in:
parent
e602fda1a3
commit
cce35f357f
@ -84,8 +84,9 @@ static int mc13xxx_led_set(struct led_classdev *led_cdev,
|
||||
case MC13892_LED_MD:
|
||||
case MC13892_LED_AD:
|
||||
case MC13892_LED_KP:
|
||||
reg = (led->id - MC13892_LED_MD) / 2;
|
||||
shift = 3 + (led->id - MC13892_LED_MD) * 12;
|
||||
off = led->id - MC13892_LED_MD;
|
||||
reg = off / 2;
|
||||
shift = 3 + (off - reg * 2) * 12;
|
||||
break;
|
||||
case MC13892_LED_R:
|
||||
case MC13892_LED_G:
|
||||
|
Loading…
Reference in New Issue
Block a user