aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/leds/leds-clevo-mail.c
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2009-01-08 12:55:03 -0500
committerRichard Purdie <rpurdie@linux.intel.com>2009-01-08 12:55:03 -0500
commit859cb7f2a4244ea6da206d3fe9cc8a6810947a68 (patch)
tree3389fe6c191418d6acc30d84e11a0760608f7431 /drivers/leds/leds-clevo-mail.c
parent0081e8020ebd814a99e45720a10e869a54ee08a6 (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-clevo-mail.c')
-rw-r--r--drivers/leds/leds-clevo-mail.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/drivers/leds/leds-clevo-mail.c b/drivers/leds/leds-clevo-mail.c
index eb3415e88f43..1813c84ea5fc 100644
--- a/drivers/leds/leds-clevo-mail.c
+++ b/drivers/leds/leds-clevo-mail.c
@@ -142,6 +142,7 @@ static struct led_classdev clevo_mail_led = {
142 .name = "clevo::mail", 142 .name = "clevo::mail",
143 .brightness_set = clevo_mail_led_set, 143 .brightness_set = clevo_mail_led_set,
144 .blink_set = clevo_mail_led_blink, 144 .blink_set = clevo_mail_led_blink,
145 .flags = LED_CORE_SUSPENDRESUME,
145}; 146};
146 147
147static int __init clevo_mail_led_probe(struct platform_device *pdev) 148static int __init clevo_mail_led_probe(struct platform_device *pdev)
@@ -155,29 +156,9 @@ static int clevo_mail_led_remove(struct platform_device *pdev)
155 return 0; 156 return 0;
156} 157}
157 158
158#ifdef CONFIG_PM
159static int clevo_mail_led_suspend(struct platform_device *dev,
160 pm_message_t state)
161{
162 led_classdev_suspend(&clevo_mail_led);
163 return 0;
164}
165
166static int clevo_mail_led_resume(struct platform_device *dev)
167{
168 led_classdev_resume(&clevo_mail_led);
169 return 0;
170}
171#else
172#define clevo_mail_led_suspend NULL
173#define clevo_mail_led_resume NULL
174#endif
175
176static struct platform_driver clevo_mail_led_driver = { 159static struct platform_driver clevo_mail_led_driver = {
177 .probe = clevo_mail_led_probe, 160 .probe = clevo_mail_led_probe,
178 .remove = clevo_mail_led_remove, 161 .remove = clevo_mail_led_remove,
179 .suspend = clevo_mail_led_suspend,
180 .resume = clevo_mail_led_resume,
181 .driver = { 162 .driver = {
182 .name = KBUILD_MODNAME, 163 .name = KBUILD_MODNAME,
183 .owner = THIS_MODULE, 164 .owner = THIS_MODULE,