public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] led: trig: timer: stop offloading on deactivation
@ 2023-07-28 12:30 Daniel Golle
  2023-07-28 13:00 ` Pavel Machek
  2023-07-28 22:55 ` kernel test robot
  0 siblings, 2 replies; 5+ messages in thread
From: Daniel Golle @ 2023-07-28 12:30 UTC (permalink / raw)
  To: Pavel Machek, Lee Jones, Daniel Golle, Johannes Berg,
	Andrew Morton, Richard Purdie, linux-leds, linux-kernel

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

Fixes: 5ada28bf7675 ("led-class: always implement blinking")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
 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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-08-17  9:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-28 12:30 [PATCH] led: trig: timer: stop offloading on deactivation Daniel Golle
2023-07-28 13:00 ` Pavel Machek
2023-07-28 15:20   ` Lee Jones
2023-07-28 22:55 ` kernel test robot
2023-08-17  9:16   ` Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox