summaryrefslogtreecommitdiff
path: root/drivers/leds/leds-cobalt-raq.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2016-10-23 22:47:26 +0300
committerJacek Anaszewski <j.anaszewski@samsung.com>2016-11-22 14:07:05 +0300
commiteb1610b4c273370f491c5e194e5a56e3470d81e8 (patch)
treeae3eaaea3b20831c561e6897f936da2f1c7652b5 /drivers/leds/leds-cobalt-raq.c
parenta9c6ce57ec2f136d08141e8220a0ffaca216f7b0 (diff)
downloadlinux-eb1610b4c273370f491c5e194e5a56e3470d81e8.tar.xz
led: core: Fix blink_brightness setting race
All 3 of led_timer_func, led_set_brightness and led_set_software_blink set blink_brightness. If led_timer_func or led_set_software_blink race with led_set_brightness they may end up overwriting the new blink_brightness. The new atomic work_flags does not protect against this as it just protects the flags and not blink_brightness. This commit introduces a new new_blink_brightness value which gets set by led_set_brightness and read by led_timer_func on LED on, fixing this. Dealing with the new brightness at LED on time, makes the new brightness apply sooner, which also fixes a led_set_brightness which happens while a oneshot blink which ends in LED on is running not getting applied. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Diffstat (limited to 'drivers/leds/leds-cobalt-raq.c')
0 files changed, 0 insertions, 0 deletions