diff options
Diffstat (limited to 'drivers/leds/leds-ams-delta.c')
-rw-r--r-- | drivers/leds/leds-ams-delta.c | 33 |
1 files changed, 3 insertions, 30 deletions
diff --git a/drivers/leds/leds-ams-delta.c b/drivers/leds/leds-ams-delta.c index 1bd590bb3a6e..446050759b4d 100644 --- a/drivers/leds/leds-ams-delta.c +++ b/drivers/leds/leds-ams-delta.c @@ -79,37 +79,12 @@ static struct ams_delta_led ams_delta_leds[] = { }, }; -#ifdef CONFIG_PM -static int ams_delta_led_suspend(struct platform_device *dev, - pm_message_t state) -{ - int i; - - for (i = 0; i < ARRAY_SIZE(ams_delta_leds); i++) - led_classdev_suspend(&ams_delta_leds[i].cdev); - - return 0; -} - -static int ams_delta_led_resume(struct platform_device *dev) -{ - int i; - - for (i = 0; i < ARRAY_SIZE(ams_delta_leds); i++) - led_classdev_resume(&ams_delta_leds[i].cdev); - - return 0; -} -#else -#define ams_delta_led_suspend NULL -#define ams_delta_led_resume NULL -#endif - static int ams_delta_led_probe(struct platform_device *pdev) { int i, ret; for (i = 0; i < ARRAY_SIZE(ams_delta_leds); i++) { + ams_delta_leds[i].cdev.flags |= LED_CORE_SUSPENDRESUME; ret = led_classdev_register(&pdev->dev, &ams_delta_leds[i].cdev); if (ret < 0) @@ -127,7 +102,7 @@ static int ams_delta_led_remove(struct platform_device *pdev) { int i; - for (i = 0; i < ARRAY_SIZE(ams_delta_leds); i--) + for (i = 0; i < ARRAY_SIZE(ams_delta_leds); i++) led_classdev_unregister(&ams_delta_leds[i].cdev); return 0; @@ -136,8 +111,6 @@ static int ams_delta_led_remove(struct platform_device *pdev) static struct platform_driver ams_delta_led_driver = { .probe = ams_delta_led_probe, .remove = ams_delta_led_remove, - .suspend = ams_delta_led_suspend, - .resume = ams_delta_led_resume, .driver = { .name = "ams-delta-led", .owner = THIS_MODULE, @@ -151,7 +124,7 @@ static int __init ams_delta_led_init(void) static void __exit ams_delta_led_exit(void) { - return platform_driver_unregister(&ams_delta_led_driver); + platform_driver_unregister(&ams_delta_led_driver); } module_init(ams_delta_led_init); |