leds: cpcap: Convert to global non-reentrant workqueue
authorColin Cross <ccross@android.com>
Wed, 12 Jan 2011 20:03:05 +0000 (12:03 -0800)
committerColin Cross <ccross@android.com>
Wed, 12 Jan 2011 20:06:26 +0000 (12:06 -0800)
commitb05ad710241f4a0adf9b5f9830b469acecb33156
tree6f7efee90b1662ee5833eb368ffb17385a78e00b
parent08136efb13158bc055ee6c94208ad2b1d21472f0
leds: cpcap: Convert to global non-reentrant workqueue

schedule_work puts work items into a global workqueue that is
not single threaded.  If the work item is running when a
second schedule_work is called, the second one could be
immediately scheduled onto the second cpu while the first
one is running, breaking the synchronization expected in
cpcap_brightness_work.

Fix by converting schedule_work to queue_work(system_nrt_wq),
which puts the work on a global single-threaded workqueue.

Change-Id: Ieba89e0353b86f11350cb37552afbce5abe87088
Signed-off-by: Colin Cross <ccross@android.com>
drivers/leds/leds-ld-cpcap.c