[PATCH] led: trig: timer: stop offloading on deactivation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Stop hardware blinking when switching from 'timer' to another trigger.

Fixes: 5ada28bf7675 ("led-class: always implement blinking")
Signed-off-by: Daniel Golle <daniel@xxxxxxxxxxxxxx>
---
 drivers/leds/trigger/ledtrig-timer.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/leds/trigger/ledtrig-timer.c b/drivers/leds/trigger/ledtrig-timer.c
index b4688d1d9d2b2..fb6b207b052b8 100644
--- a/drivers/leds/trigger/ledtrig-timer.c
+++ b/drivers/leds/trigger/ledtrig-timer.c
@@ -125,6 +125,8 @@ static void timer_trig_deactivate(struct led_classdev *led_cdev)
 {
 	/* Stop blinking */
 	led_set_brightness(led_cdev, LED_OFF);
+	if (led_cdev->blink_set)
+		led_cdev->blink_set(led_cdev, 0, 0);
 }
 
 static struct led_trigger timer_led_trigger = {
-- 
2.41.0




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux