diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-06-02 20:14:25 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-06-02 20:14:25 +0300 |
commit | f58c356ea74feef8c2bb774dd19ded91567a5cf2 (patch) | |
tree | 11afa9f83afd382898998710f87bca4972bafed8 /drivers/leds | |
parent | 9221dced3069cc9ae2986ba1191b02dae560df28 (diff) | |
parent | 8c0f693c6effbc3f42f77a9e81209af9af20910c (diff) | |
download | linux-f58c356ea74feef8c2bb774dd19ded91567a5cf2.tar.xz |
Merge tag 'led-fixes-for-5.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds
Pull LED fix from Jacek Anaszewski:
"Fix for a recent change in LED core, that didn't take into account the
possibility of calling led_blink_setup() from atomic context"
* tag 'led-fixes-for-5.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds:
leds: avoid flush_work in atomic context
Diffstat (limited to 'drivers/leds')
-rw-r--r-- | drivers/leds/led-core.c | 5 | ||||
-rw-r--r-- | drivers/leds/trigger/ledtrig-timer.c | 5 |
2 files changed, 5 insertions, 5 deletions
diff --git a/drivers/leds/led-core.c b/drivers/leds/led-core.c index e9ae7f87ab90..e3da7c03da1b 100644 --- a/drivers/leds/led-core.c +++ b/drivers/leds/led-core.c @@ -164,11 +164,6 @@ static void led_blink_setup(struct led_classdev *led_cdev, unsigned long *delay_on, unsigned long *delay_off) { - /* - * If "set brightness to 0" is pending in workqueue, we don't - * want that to be reordered after blink_set() - */ - flush_work(&led_cdev->set_brightness_work); if (!test_bit(LED_BLINK_ONESHOT, &led_cdev->work_flags) && led_cdev->blink_set && !led_cdev->blink_set(led_cdev, delay_on, delay_off)) diff --git a/drivers/leds/trigger/ledtrig-timer.c b/drivers/leds/trigger/ledtrig-timer.c index ca898c1383be..427fc3c303d5 100644 --- a/drivers/leds/trigger/ledtrig-timer.c +++ b/drivers/leds/trigger/ledtrig-timer.c @@ -113,6 +113,11 @@ static int timer_trig_activate(struct led_classdev *led_cdev) led_cdev->flags &= ~LED_INIT_DEFAULT_TRIGGER; } + /* + * If "set brightness to 0" is pending in workqueue, we don't + * want that to be reordered after blink_set() + */ + flush_work(&led_cdev->set_brightness_work); led_blink_set(led_cdev, &led_cdev->blink_delay_on, &led_cdev->blink_delay_off); |