mirror of
https://github.com/torvalds/linux.git
synced 2026-09-25 21:21:09 -04:00
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 <[email protected]> Signed-off-by: Andrew Lunn <[email protected]> Reviewed-by: Simon Horman <[email protected]> Tested-by: Daniel Golle <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
This commit is contained in:
committed by
Jakub Kicinski
parent
460b0b648f
commit
e8fbcc47a8
@@ -595,6 +595,8 @@ static void netdev_trig_deactivate(struct led_classdev *led_cdev)
|
||||
|
||||
cancel_delayed_work_sync(&trigger_data->work);
|
||||
|
||||
led_set_brightness(led_cdev, LED_OFF);
|
||||
|
||||
dev_put(trigger_data->net_dev);
|
||||
|
||||
kfree(trigger_data);
|
||||
|
||||
Reference in New Issue
Block a user