[PATCH v2 06/09] backlight: enable backlight in 88pm860x
Richard Purdie
rpurdie at rpsys.net
Tue Jan 12 04:32:25 EST 2010
On Mon, 2010-01-11 at 03:32 -0500, Haojian Zhuang wrote:
> On Fri, Jan 8, 2010 at 7:27 AM, Richard Purdie <rpurdie at rpsys.net> >
> In the LED patch I'm not sure I like the SET_BRIGHTNESS and SET_BLINK
> > sharing of a workqueue though. Its not going to crash, I can just see
> > values potentially getting lost as the code has a race condition. It
> > would be easier if it just compared led->current_brightness to
> > led->brightness acting if needed and something similar for LED blinking.
>
> Excuse me that there's a mutex lock in __led_set(). Both
> SET_BRIGHTNESS & SET_BLINK calls __led_set(). There shouldn't be race
> condition on set led. What's your opinion?
There is a race condition since if you get a blink and brightness set
call at around the same time, only one of them will end up being
applied. Its not going to crash but its also less than ideal.
Cheers,
Richard
More information about the linux-arm-kernel
mailing list