[PATCH 3/5] leds: trigger: panic: Use led_trigger_event_nosleep

Ezequiel Garcia ezequiel at vanguardiasur.com.ar
Mon Apr 4 13:22:04 PDT 2016


Calling led_trigger_event may schedule a delayed LED set,
if the LED was being used by a delayed blink trigger when
the kernel paniced.

Therefore, we must use led_trigger_event_nosleep to override
this situation, and set the LED unconditionally.

Signed-off-by: Ezequiel Garcia <ezequiel at vanguardiasur.com.ar>
---
 drivers/leds/trigger/ledtrig-panic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/leds/trigger/ledtrig-panic.c b/drivers/leds/trigger/ledtrig-panic.c
index 627b350c5ec3..145c238d55f2 100644
--- a/drivers/leds/trigger/ledtrig-panic.c
+++ b/drivers/leds/trigger/ledtrig-panic.c
@@ -17,7 +17,7 @@ static struct led_trigger *trigger;
 
 static long led_panic_blink(int state)
 {
-	led_trigger_event(trigger, state ? LED_FULL : LED_OFF);
+	led_trigger_event_nosleep(trigger, state ? LED_FULL : LED_OFF);
 	return 0;
 }
 
-- 
2.7.0




More information about the linux-arm-kernel mailing list