Thread (12 messages) 12 messages, 5 authors, 2023-05-18

Re: [PATCH RESEND 4/4] leds: Clear LED_INIT_DEFAULT_TRIGGER when clearing current trigger

From: Lee Jones <lee@kernel.org>
Date: 2023-05-18 12:14:36
Also in: linux-leds, linux-pm, linux-usb, netfilter-devel

On Wed, 10 May 2023, Hans de Goede wrote:
Not all triggers use LED_INIT_DEFAULT_TRIGGER, which means that it
will not get cleared when the default trigger is a trigger which
does not use it such as "default-on".

If the default trigger then later gets replaced by a trigger which
does check LED_INIT_DEFAULT_TRIGGER, such as "timer" then that trigger
will behave as if it is the default trigger which it should not do.

To fix this clear the LED_INIT_DEFAULT_TRIGGER flag when clearing
the current trigger, so that it will not be set for any subsequently
set (non default) triggers.

Reviewed-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Tested-by: Yauhen Kharuzhy <redacted>
Signed-off-by: Hans de Goede <redacted>
---
 drivers/leds/led-triggers.c | 1 +
 1 file changed, 1 insertion(+)
Applied, thanks

-- 
Lee Jones [李琼斯]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help