aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/leds/leds-s3c24xx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/leds/leds-s3c24xx.c')
-rw-r--r--drivers/leds/leds-s3c24xx.c25
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)
82 led->cdev.brightness_set = s3c24xx_led_set; 82 led->cdev.brightness_set = s3c24xx_led_set;
83 led->cdev.default_trigger = pdata->def_trigger; 83 led->cdev.default_trigger = pdata->def_trigger;
84 led->cdev.name = pdata->name; 84 led->cdev.name = pdata->name;
85 led->cdev.flags |= LED_CORE_SUSPENDRESUME;
85 86
86 led->pdata = pdata; 87 led->pdata = pdata;
87 88
@@ -111,33 +112,9 @@ static int s3c24xx_led_probe(struct platform_device *dev)
111 return ret; 112 return ret;
112} 113}
113 114
114
115#ifdef CONFIG_PM
116static int s3c24xx_led_suspend(struct platform_device *dev, pm_message_t state)
117{
118 struct s3c24xx_gpio_led *led = pdev_to_gpio(dev);
119
120 led_classdev_suspend(&led->cdev);
121 return 0;
122}
123
124static int s3c24xx_led_resume(struct platform_device *dev)
125{
126 struct s3c24xx_gpio_led *led = pdev_to_gpio(dev);
127
128 led_classdev_resume(&led->cdev);
129 return 0;
130}
131#else
132#define s3c24xx_led_suspend NULL
133#define s3c24xx_led_resume NULL
134#endif
135
136static struct platform_driver s3c24xx_led_driver = { 115static struct platform_driver s3c24xx_led_driver = {
137 .probe = s3c24xx_led_probe, 116 .probe = s3c24xx_led_probe,
138 .remove = s3c24xx_led_remove, 117 .remove = s3c24xx_led_remove,
139 .suspend = s3c24xx_led_suspend,
140 .resume = s3c24xx_led_resume,
141 .driver = { 118 .driver = {
142 .name = "s3c24xx_led", 119 .name = "s3c24xx_led",
143 .owner = THIS_MODULE, 120 .owner = THIS_MODULE,