summaryrefslogtreecommitdiffstats
path: root/drivers/leds/leds-hp6xx.c
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2009-01-08 17:55:03 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2009-01-08 17:55:03 +0000
commit859cb7f2a4244ea6da206d3fe9cc8a6810947a68 (patch)
tree3389fe6c191418d6acc30d84e11a0760608f7431 /drivers/leds/leds-hp6xx.c
parent0081e8020ebd814a99e45720a10e869a54ee08a6 (diff)
downloadop-kernel-dev-859cb7f2a4244ea6da206d3fe9cc8a6810947a68.zip
op-kernel-dev-859cb7f2a4244ea6da206d3fe9cc8a6810947a68.tar.gz
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-hp6xx.c')
-rw-r--r--drivers/leds/leds-hp6xx.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/drivers/leds/leds-hp6xx.c b/drivers/leds/leds-hp6xx.c
index e8fb1ba..e4ce1fd 100644
--- a/drivers/leds/leds-hp6xx.c
+++ b/drivers/leds/leds-hp6xx.c
@@ -45,30 +45,16 @@ static struct led_classdev hp6xx_red_led = {
.name = "hp6xx:red",
.default_trigger = "hp6xx-charge",
.brightness_set = hp6xxled_red_set,
+ .flags = LED_CORE_SUSPENDRESUME,
};
static struct led_classdev hp6xx_green_led = {
.name = "hp6xx:green",
.default_trigger = "ide-disk",
.brightness_set = hp6xxled_green_set,
+ .flags = LED_CORE_SUSPENDRESUME,
};
-#ifdef CONFIG_PM
-static int hp6xxled_suspend(struct platform_device *dev, pm_message_t state)
-{
- led_classdev_suspend(&hp6xx_red_led);
- led_classdev_suspend(&hp6xx_green_led);
- return 0;
-}
-
-static int hp6xxled_resume(struct platform_device *dev)
-{
- led_classdev_resume(&hp6xx_red_led);
- led_classdev_resume(&hp6xx_green_led);
- return 0;
-}
-#endif
-
static int hp6xxled_probe(struct platform_device *pdev)
{
int ret;
@@ -98,10 +84,6 @@ MODULE_ALIAS("platform:hp6xx-led");
static struct platform_driver hp6xxled_driver = {
.probe = hp6xxled_probe,
.remove = hp6xxled_remove,
-#ifdef CONFIG_PM
- .suspend = hp6xxled_suspend,
- .resume = hp6xxled_resume,
-#endif
.driver = {
.name = "hp6xx-led",
.owner = THIS_MODULE,
OpenPOWER on IntegriCloud