diff options
Diffstat (limited to 'drivers/leds/leds-gpio.c')
-rw-r--r-- | drivers/leds/leds-gpio.c | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c index b13bd2950e95..2e3df08b649b 100644 --- a/drivers/leds/leds-gpio.c +++ b/drivers/leds/leds-gpio.c | |||
@@ -105,6 +105,7 @@ static int gpio_led_probe(struct platform_device *pdev) | |||
105 | } | 105 | } |
106 | led_dat->cdev.brightness_set = gpio_led_set; | 106 | led_dat->cdev.brightness_set = gpio_led_set; |
107 | led_dat->cdev.brightness = LED_OFF; | 107 | led_dat->cdev.brightness = LED_OFF; |
108 | led_dat->cdev.flags |= LED_CORE_SUSPENDRESUME; | ||
108 | 109 | ||
109 | gpio_direction_output(led_dat->gpio, led_dat->active_low); | 110 | gpio_direction_output(led_dat->gpio, led_dat->active_low); |
110 | 111 | ||
@@ -154,44 +155,9 @@ static int __devexit gpio_led_remove(struct platform_device *pdev) | |||
154 | return 0; | 155 | return 0; |
155 | } | 156 | } |
156 | 157 | ||
157 | #ifdef CONFIG_PM | ||
158 | static int gpio_led_suspend(struct platform_device *pdev, pm_message_t state) | ||
159 | { | ||
160 | struct gpio_led_platform_data *pdata = pdev->dev.platform_data; | ||
161 | struct gpio_led_data *leds_data; | ||
162 | int i; | ||
163 | |||
164 | leds_data = platform_get_drvdata(pdev); | ||
165 | |||
166 | for (i = 0; i < pdata->num_leds; i++) | ||
167 | led_classdev_suspend(&leds_data[i].cdev); | ||
168 | |||
169 | return 0; | ||
170 | } | ||
171 | |||
172 | static int gpio_led_resume(struct platform_device *pdev) | ||
173 | { | ||
174 | struct gpio_led_platform_data *pdata = pdev->dev.platform_data; | ||
175 | struct gpio_led_data *leds_data; | ||
176 | int i; | ||
177 | |||
178 | leds_data = platform_get_drvdata(pdev); | ||
179 | |||
180 | for (i = 0; i < pdata->num_leds; i++) | ||
181 | led_classdev_resume(&leds_data[i].cdev); | ||
182 | |||
183 | return 0; | ||
184 | } | ||
185 | #else | ||
186 | #define gpio_led_suspend NULL | ||
187 | #define gpio_led_resume NULL | ||
188 | #endif | ||
189 | |||
190 | static struct platform_driver gpio_led_driver = { | 158 | static struct platform_driver gpio_led_driver = { |
191 | .probe = gpio_led_probe, | 159 | .probe = gpio_led_probe, |
192 | .remove = __devexit_p(gpio_led_remove), | 160 | .remove = __devexit_p(gpio_led_remove), |
193 | .suspend = gpio_led_suspend, | ||
194 | .resume = gpio_led_resume, | ||
195 | .driver = { | 161 | .driver = { |
196 | .name = "leds-gpio", | 162 | .name = "leds-gpio", |
197 | .owner = THIS_MODULE, | 163 | .owner = THIS_MODULE, |