diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2009-01-08 12:55:03 -0500 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2009-01-08 12:55:03 -0500 |
commit | 859cb7f2a4244ea6da206d3fe9cc8a6810947a68 (patch) | |
tree | 3389fe6c191418d6acc30d84e11a0760608f7431 /drivers/leds/leds-net48xx.c | |
parent | 0081e8020ebd814a99e45720a10e869a54ee08a6 (diff) |
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-net48xx.c')
-rw-r--r-- | drivers/leds/leds-net48xx.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/drivers/leds/leds-net48xx.c b/drivers/leds/leds-net48xx.c index 054360473c94..93987a12da49 100644 --- a/drivers/leds/leds-net48xx.c +++ b/drivers/leds/leds-net48xx.c | |||
@@ -33,26 +33,9 @@ static void net48xx_error_led_set(struct led_classdev *led_cdev, | |||
33 | static struct led_classdev net48xx_error_led = { | 33 | static struct led_classdev net48xx_error_led = { |
34 | .name = "net48xx::error", | 34 | .name = "net48xx::error", |
35 | .brightness_set = net48xx_error_led_set, | 35 | .brightness_set = net48xx_error_led_set, |
36 | .flags = LED_CORE_SUSPENDRESUME, | ||
36 | }; | 37 | }; |
37 | 38 | ||
38 | #ifdef CONFIG_PM | ||
39 | static int net48xx_led_suspend(struct platform_device *dev, | ||
40 | pm_message_t state) | ||
41 | { | ||
42 | led_classdev_suspend(&net48xx_error_led); | ||
43 | return 0; | ||
44 | } | ||
45 | |||
46 | static int net48xx_led_resume(struct platform_device *dev) | ||
47 | { | ||
48 | led_classdev_resume(&net48xx_error_led); | ||
49 | return 0; | ||
50 | } | ||
51 | #else | ||
52 | #define net48xx_led_suspend NULL | ||
53 | #define net48xx_led_resume NULL | ||
54 | #endif | ||
55 | |||
56 | static int net48xx_led_probe(struct platform_device *pdev) | 39 | static int net48xx_led_probe(struct platform_device *pdev) |
57 | { | 40 | { |
58 | return led_classdev_register(&pdev->dev, &net48xx_error_led); | 41 | return led_classdev_register(&pdev->dev, &net48xx_error_led); |
@@ -67,8 +50,6 @@ static int net48xx_led_remove(struct platform_device *pdev) | |||
67 | static struct platform_driver net48xx_led_driver = { | 50 | static struct platform_driver net48xx_led_driver = { |
68 | .probe = net48xx_led_probe, | 51 | .probe = net48xx_led_probe, |
69 | .remove = net48xx_led_remove, | 52 | .remove = net48xx_led_remove, |
70 | .suspend = net48xx_led_suspend, | ||
71 | .resume = net48xx_led_resume, | ||
72 | .driver = { | 53 | .driver = { |
73 | .name = DRVNAME, | 54 | .name = DRVNAME, |
74 | .owner = THIS_MODULE, | 55 | .owner = THIS_MODULE, |