leds: core: Flush scheduled work for system suspend
[linux-2.6-microblaze.git] / drivers / leds / led-class.c
index 3363a65..cc3929f 100644 (file)
@@ -173,6 +173,7 @@ void led_classdev_suspend(struct led_classdev *led_cdev)
 {
        led_cdev->flags |= LED_SUSPENDED;
        led_set_brightness_nopm(led_cdev, 0);
+       flush_work(&led_cdev->set_brightness_work);
 }
 EXPORT_SYMBOL_GPL(led_classdev_suspend);