summaryrefslogtreecommitdiffstats
path: root/drivers/leds/leds-wm8350.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-wm8350.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-wm8350.c')
-rw-r--r--drivers/leds/leds-wm8350.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/drivers/leds/leds-wm8350.c b/drivers/leds/leds-wm8350.c
index 846ed97..38c6bcb 100644
--- a/drivers/leds/leds-wm8350.c
+++ b/drivers/leds/leds-wm8350.c
@@ -184,27 +184,6 @@ static void wm8350_led_set(struct led_classdev *led_cdev,
spin_unlock_irqrestore(&led->value_lock, flags);
}
-#ifdef CONFIG_PM
-static int wm8350_led_suspend(struct platform_device *pdev, pm_message_t state)
-{
- struct wm8350_led *led = platform_get_drvdata(pdev);
-
- led_classdev_suspend(&led->cdev);
- return 0;
-}
-
-static int wm8350_led_resume(struct platform_device *pdev)
-{
- struct wm8350_led *led = platform_get_drvdata(pdev);
-
- led_classdev_resume(&led->cdev);
- return 0;
-}
-#else
-#define wm8350_led_suspend NULL
-#define wm8350_led_resume NULL
-#endif
-
static void wm8350_led_shutdown(struct platform_device *pdev)
{
struct wm8350_led *led = platform_get_drvdata(pdev);
@@ -255,6 +234,7 @@ static int wm8350_led_probe(struct platform_device *pdev)
led->cdev.brightness_set = wm8350_led_set;
led->cdev.default_trigger = pdata->default_trigger;
led->cdev.name = pdata->name;
+ led->cdev.flags |= LED_CORE_SUSPENDRESUME;
led->enabled = regulator_is_enabled(isink);
led->isink = isink;
led->dcdc = dcdc;
@@ -311,8 +291,6 @@ static struct platform_driver wm8350_led_driver = {
.probe = wm8350_led_probe,
.remove = wm8350_led_remove,
.shutdown = wm8350_led_shutdown,
- .suspend = wm8350_led_suspend,
- .resume = wm8350_led_resume,
};
static int __devinit wm8350_led_init(void)
OpenPOWER on IntegriCloud