diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2009-01-08 18:55:03 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2009-01-08 18:55:03 +0100 |
commit | 859cb7f2a4244ea6da206d3fe9cc8a6810947a68 (patch) | |
tree | 3389fe6c191418d6acc30d84e11a0760608f7431 /drivers/leds/leds-s3c24xx.c | |
parent | leds: Add WM8350 LED driver (diff) | |
download | linux-859cb7f2a4244ea6da206d3fe9cc8a6810947a68.tar.xz linux-859cb7f2a4244ea6da206d3fe9cc8a6810947a68.zip |
leds: Add suspend/resume to the core class
Add suspend/resume to the core class and remove all the now unneeded
code from various drivers. Originally the class code couldn't support
suspend/resume but since class_device can there is no reason for
each driver doing its own suspend/resume anymore.
Diffstat (limited to 'drivers/leds/leds-s3c24xx.c')
-rw-r--r-- | drivers/leds/leds-s3c24xx.c | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/drivers/leds/leds-s3c24xx.c b/drivers/leds/leds-s3c24xx.c index 25a07f2643ad..4d81131542ae 100644 --- a/drivers/leds/leds-s3c24xx.c +++ b/drivers/leds/leds-s3c24xx.c @@ -82,6 +82,7 @@ static int s3c24xx_led_probe(struct platform_device *dev) led->cdev.brightness_set = s3c24xx_led_set; led->cdev.default_trigger = pdata->def_trigger; led->cdev.name = pdata->name; + led->cdev.flags |= LED_CORE_SUSPENDRESUME; led->pdata = pdata; @@ -111,33 +112,9 @@ static int s3c24xx_led_probe(struct platform_device *dev) return ret; } - -#ifdef CONFIG_PM -static int s3c24xx_led_suspend(struct platform_device *dev, pm_message_t state) -{ - struct s3c24xx_gpio_led *led = pdev_to_gpio(dev); - - led_classdev_suspend(&led->cdev); - return 0; -} - -static int s3c24xx_led_resume(struct platform_device *dev) -{ - struct s3c24xx_gpio_led *led = pdev_to_gpio(dev); - - led_classdev_resume(&led->cdev); - return 0; -} -#else -#define s3c24xx_led_suspend NULL -#define s3c24xx_led_resume NULL -#endif - static struct platform_driver s3c24xx_led_driver = { .probe = s3c24xx_led_probe, .remove = s3c24xx_led_remove, - .suspend = s3c24xx_led_suspend, - .resume = s3c24xx_led_resume, .driver = { .name = "s3c24xx_led", .owner = THIS_MODULE, |