leds-twl4030-pwm: fix another race
authorGrazvydas Ignotas <notasas@gmail.com>
Sat, 19 Mar 2016 01:28:14 +0000 (03:28 +0200)
committerGrazvydas Ignotas <notasas@gmail.com>
Sat, 19 Mar 2016 17:37:59 +0000 (19:37 +0200)
commit01f551de7fa4a384027f3f8d9119c45ca9d0fd1a
tree2b380d7c3becf534c2603696561176c0e4c8e7b1
parent46a680fe266079d36c6e24308518ce0f21eb0766
leds-twl4030-pwm: fix another race

This is a race between twl4030_pwmled_work() reading led->new_brightness
vs twl4030_pwmled_brightness() writing to it. Probably needs a proper
lock, but we want twl4030_pwmled_brightness() to not block and assume
work items come from single queue and should not race each other.
drivers/leds/leds-twl4030-pwm.c