linux-stable/drivers/leds
Kai-Heng Feng a14ab85a26 leds: core: Flush scheduled work for system suspend
[ Upstream commit 302a085c20 ]

Sometimes LED won't be turned off by LED_CORE_SUSPENDRESUME flag upon
system suspend.

led_set_brightness_nopm() uses schedule_work() to set LED brightness.
However, there's no guarantee that the scheduled work gets executed
because no one flushes the work.

So flush the scheduled work to make sure LED gets turned off.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Fixes: 81fe8e5b73 ("leds: core: Add led_set_brightness_nosleep{nopm} functions")
Signed-off-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-08-21 09:48:09 +02:00
..
trigger License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig LED updates for 4.14 2017-09-07 14:33:13 -07:00
led-class-flash.c
led-class.c leds: core: Flush scheduled work for system suspend 2020-08-21 09:48:09 +02:00
led-core.c leds: core: Fix regression caused by commit 2b83ff96f5 2018-03-03 10:24:35 +01:00
led-triggers.c
leds-88pm860x.c leds: 88pm860x: fix use-after-free on unbind 2020-08-21 09:47:59 +02:00
leds-aat1290.c LED updates for 4.14 2017-09-07 14:33:13 -07:00
leds-adp5520.c
leds-as3645a.c as3645a: Unregister indicator LED on device unbind 2017-09-23 21:17:43 +02:00
leds-asic3.c
leds-bcm6328.c leds: bcm6328: fix signal source assignment for leds 4 to 7 2017-06-13 20:36:56 +02:00
leds-bcm6358.c
leds-bd2802.c
leds-blinkm.c leds: blinkm: constify attribute_group structures. 2017-08-04 21:54:15 +02:00
leds-clevo-mail.c dmi: Mark all struct dmi_system_id instances const 2017-09-14 11:59:30 +02:00
leds-cobalt-qube.c
leds-cobalt-raq.c
leds-cpcap.c leds: cpcap: new driver 2017-03-29 21:02:27 +02:00
leds-da903x.c leds: da903x: fix use-after-free on unbind 2020-08-21 09:47:59 +02:00
leds-da9052.c
leds-dac124s085.c
leds-fsg.c
leds-gpio-register.c
leds-gpio.c leds: gpio: Allow LED to retain state at shutdown 2017-08-29 21:10:40 +02:00
leds-hp6xx.c
leds-ipaq-micro.c
leds-is31fl32xx.c leds: Convert to using %pOF instead of full_name 2017-08-12 23:50:07 +02:00
leds-is31fl319x.c
leds-ktd2692.c leds: ktd2692: avoid harmless maybe-uninitialized warning 2017-01-26 21:16:38 +01:00
leds-lm355x.c leds: lm355x: avoid enum conversion warning 2020-08-21 09:48:07 +02:00
leds-lm3530.c
leds-lm3533.c leds: lm3533: fix use-after-free on unbind 2020-08-21 09:47:59 +02:00
leds-lm3642.c
leds-locomo.c
leds-lp55xx-common.c leds: lp55xx: fix null deref on firmware load failure 2019-04-05 22:31:33 +02:00
leds-lp55xx-common.h
leds-lp3944.c
leds-lp3952.c leds: lp3952: Use 'if (ret)' pattern 2017-03-23 20:33:59 +01:00
leds-lp5521.c leds: lp5521: make several arrays static const 2017-08-29 21:10:38 +02:00
leds-lp5523.c leds: lp5523: fix a missing check of return value of lp55xx_read 2019-02-27 10:08:05 +01:00
leds-lp5562.c leds: leds-lp5562 allow firmware files up to the maximum length 2019-10-05 12:47:45 +02:00
leds-lp8501.c leds: lp8501: make several arrays static const 2017-08-29 21:10:39 +02:00
leds-lp8788.c
leds-lp8860.c
leds-lt3593.c
leds-max8997.c
leds-max77693.c media: v4l2-flash-led-class: Create separate sub-devices for indicators 2017-08-26 20:26:35 -04:00
leds-mc13783.c
leds-menf21bmc.c
leds-mlxcpld.c
leds-mt6323.c leds: mt6323: Fix an off by one bug in probe 2017-03-23 20:23:57 +01:00
leds-net48xx.c
leds-netxbig.c
leds-nic78bx.c
leds-ns2.c
leds-ot200.c
leds-pca955x.c leds: pca955x: Don't invert requested value in pca955x_gpio_set_value() 2017-12-25 14:26:27 +01:00
leds-pca963x.c leds: pca963x: Fix open-drain initialization 2020-02-28 16:35:55 +01:00
leds-pca9532.c leds: pca9532: fix a potential NULL pointer dereference 2019-05-04 09:15:22 +02:00
leds-pm8058.c leds: pm8058: Silence pointer to integer size warning 2018-03-19 08:42:50 +01:00
leds-powernv.c leds: powernv: Delete an error message for a failed memory allocation in powernv_led_create() 2017-08-29 21:10:39 +02:00
leds-pwm.c leds: pwm: silently error out on EPROBE_DEFER 2019-05-16 19:42:29 +02:00
leds-rb532.c
leds-regulator.c
leds-s3c24xx.c
leds-ss4200.c dmi: Mark all struct dmi_system_id instances const 2017-09-14 11:59:30 +02:00
leds-sunfire.c
leds-syscon.c
leds-tca6507.c
leds-tlc591xx.c leds: tlc591xx: add missing of_node_put 2017-07-16 18:45:43 +02:00
leds-wm831x-status.c leds: wm831x-status: fix use-after-free on unbind 2020-08-21 09:47:58 +02:00
leds-wm8350.c
leds-wrap.c
leds.h
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
uleds.c