Commit 20ac8f72 authored by Matthieu CASTET's avatar Matthieu CASTET Committed by Greg Kroah-Hartman

led: core: Fix brightness setting when setting delay_off=0


[ Upstream commit 2b83ff96 ]

With the current code, the following sequence won't work :
echo timer > trigger

echo 0 >  delay_off
* at this point we call
** led_delay_off_store
** led_blink_set
parent a4bd8a5a
...@@ -149,7 +149,7 @@ void led_blink_set(struct led_classdev *led_cdev, ...@@ -149,7 +149,7 @@ void led_blink_set(struct led_classdev *led_cdev,
unsigned long *delay_on, unsigned long *delay_on,
unsigned long *delay_off) unsigned long *delay_off)
{ {
del_timer_sync(&led_cdev->blink_timer); led_stop_software_blink(led_cdev);
led_cdev->flags &= ~LED_BLINK_ONESHOT; led_cdev->flags &= ~LED_BLINK_ONESHOT;
led_cdev->flags &= ~LED_BLINK_ONESHOT_STOP; led_cdev->flags &= ~LED_BLINK_ONESHOT_STOP;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment