leds: lp8550: Use non-reentrant workqueue
authorColin Cross <ccross@android.com>
Mon, 25 Apr 2011 21:18:18 +0000 (14:18 -0700)
committerColin Cross <ccross@android.com>
Mon, 25 Apr 2011 21:20:28 +0000 (14:20 -0700)
lp8550_brightness_work is not safe to call from multiple threads,
use the non-reentrant workqueue.

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

index 9504ea8785bdc9b0ed0fd24e7540e6567c0e5dcf..aa7f1a4c69819f3f92c8d3c98891101d038e47b1 100755 (executable)
@@ -193,7 +193,7 @@ static void ld_lp8550_brightness_set(struct led_classdev *led_cdev,
 
        led_data->brightness = brightness;
        if (!led_data->suspended)
-               schedule_work(&led_data->wq);
+               queue_work(system_nrt_wq, &led_data->wq);
 }
 EXPORT_SYMBOL(ld_lp8550_brightness_set);
 
@@ -352,7 +352,7 @@ static void lp8550_late_resume(struct early_suspend *h)
        struct lp8550_data *led_data =
                container_of(h, struct lp8550_data, early_suspender);
        led_data->suspended = false;
-       schedule_work(&led_data->wq);
+       queue_work(system_nrt_wq, &led_data->wq);
 }
 #endif