Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit a14ab85a authored by Kai-Heng Feng's avatar Kai-Heng Feng Committed by Greg Kroah-Hartman
Browse files

leds: core: Flush scheduled work for system suspend



[ Upstream commit 302a085c20194bfa7df52e0fe684ee0c41da02e6 ]

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: default avatarKai-Heng Feng <kai.heng.feng@canonical.com>
Acked-by: default avatarJacek Anaszewski <jacek.anaszewski@gmail.com>
Fixes: 81fe8e5b ("leds: core: Add led_set_brightness_nosleep{nopm} functions")
Signed-off-by: default avatarPavel Machek <pavel@ucw.cz>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 7751804f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment