leds: trig-netdev: Disable offload on deactivation of trigger
authorAndrew Lunn <andrew@lunn.ch>
Tue, 8 Aug 2023 21:04:36 +0000 (23:04 +0200)
committerJakub Kicinski <kuba@kernel.org>
Fri, 11 Aug 2023 00:35:00 +0000 (17:35 -0700)
commite8fbcc47a8e935f36f044d85f21a99acecbd7bfb
treeda9c44d53a08c3571871c58a67edaf56984ed9c7
parent460b0b648fab24f576c481424e0de5479ffb9786
leds: trig-netdev: Disable offload on deactivation of trigger

Ensure that the offloading of blinking is stopped when the trigger is
deactivated. Calling led_set_brightness() is documented as stopping
offload and setting the LED to a constant brightness.

Suggested-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Tested-by: Daniel Golle <daniel@makrotopia.org>
Link: https://lore.kernel.org/r/20230808210436.838995-5-andrew@lunn.ch
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/leds/trigger/ledtrig-netdev.c