From: Jacek Anaszewski Date: Mon, 19 Mar 2018 19:23:19 +0000 (+0100) Subject: led: core: Clear LED_BLINK_SW flag in led_blink_set() X-Git-Tag: v4.9.90~170 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d1ef7ed6e586ef69b366719bc37f1009e1d7d5d4;p=platform%2Fkernel%2Flinux-amlogic.git led: core: Clear LED_BLINK_SW flag in led_blink_set() [Only needed in 4.9.y due to other fixes in mainline - gregkh] 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 --- diff --git a/drivers/leds/led-core.c b/drivers/leds/led-core.c index 3bce448..454ed4d 100644 --- a/drivers/leds/led-core.c +++ b/drivers/leds/led-core.c @@ -188,6 +188,7 @@ void led_blink_set(struct led_classdev *led_cdev, { del_timer_sync(&led_cdev->blink_timer); + led_cdev->flags &= ~LED_BLINK_SW; led_cdev->flags &= ~LED_BLINK_ONESHOT; led_cdev->flags &= ~LED_BLINK_ONESHOT_STOP;