1
0
Fork 0

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

[ Upstream commit 2b83ff96f5 ]

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
pull/10/head
Matthieu CASTET 2017-12-12 11:10:44 +01:00 committed by Greg Kroah-Hartman
parent 6b800ce9ee
commit c2acc88591
1 changed files with 1 additions and 1 deletions

View File

@ -187,7 +187,7 @@ void led_blink_set(struct led_classdev *led_cdev,
unsigned long *delay_on,
unsigned long *delay_off)
{
del_timer_sync(&led_cdev->blink_timer);
led_stop_software_blink(led_cdev);
clear_bit(LED_BLINK_ONESHOT, &led_cdev->work_flags);
clear_bit(LED_BLINK_ONESHOT_STOP, &led_cdev->work_flags);