diff options
author | Jacek Anaszewski <jacek.anaszewski@gmail.com> | 2018-01-03 23:13:45 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-03-03 12:24:35 +0300 |
commit | 9024bb7e27d2684d71f06f4344c71c7924e8b80c (patch) | |
tree | a1ee64a0fc3ab6207f0ca4c4a653e92b1e30607e /drivers/pinctrl/core.c | |
parent | be2b86901a346d1fc2e496ce5823541ef3f82737 (diff) | |
download | linux-9024bb7e27d2684d71f06f4344c71c7924e8b80c.tar.xz |
leds: core: Fix regression caused by commit 2b83ff96f51d
[ Upstream commit 7b6af2c53192f1766892ef40c8f48a413509ed72 ]
Commit 2b83ff96f51d ("led: core: Fix brightness setting when setting delay_off=0")
replaced del_timer_sync(&led_cdev->blink_timer) with led_stop_software_blink()
in led_blink_set(), which additionally clears LED_BLINK_SW flag as well as
zeroes blink_delay_on and blink_delay_off properties of the struct led_classdev.
Cleansing of the latter ones wasn't required to fix the original issue but
wasn't considered harmful. It nonetheless turned out to be so in case when
pointer to one or both props is passed to led_blink_set() like in the
ledtrig-timer.c. In such cases zeroes are passed later in delay_on and/or
delay_off arguments to led_blink_setup(), which results either in stopping
the software blinking or setting blinking frequency always to 1Hz.
Avoid using led_stop_software_blink() and add a single call required
to clear LED_BLINK_SW flag, which was the only needed modification to
fix the original issue.
Fixes 2b83ff96f51d ("led: core: Fix brightness setting when setting delay_off=0")
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/pinctrl/core.c')
0 files changed, 0 insertions, 0 deletions