Commit e3e5fc91d9828a9b94a3992de47d47d2d2e34ec6
Committed by
Linus Torvalds
1 parent
fd7bcea35e
Exists in
master
and in
7 other branches
[PATCH] leds: turn LED off when changing triggers
I was playing with LED triggers when I noticed that changing from heartbeat (or ide-disk) to "none" at the right moment would leave the LED stuck on. This is easy to reproduce by doing "find / >/dev/null" with the ide-disk trigger enabled and then switching to "none". Here is a patch that fixes the problem by explicitly turning the LED off after removing the existing trigger. Signed-off-by: Paul Collins <paul@ondioline.org> Acked-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Showing 1 changed file with 1 additions and 0 deletions Side-by-side Diff
drivers/leds/led-triggers.c
... | ... | @@ -125,6 +125,7 @@ |
125 | 125 | write_unlock_irqrestore(&led_cdev->trigger->leddev_list_lock, flags); |
126 | 126 | if (led_cdev->trigger->deactivate) |
127 | 127 | led_cdev->trigger->deactivate(led_cdev); |
128 | + led_set_brightness(led_cdev, LED_OFF); | |
128 | 129 | } |
129 | 130 | if (trigger) { |
130 | 131 | write_lock_irqsave(&trigger->leddev_list_lock, flags); |