diff options
Diffstat (limited to 'drivers/leds/leds-wm8350.c')
-rw-r--r-- | drivers/leds/leds-wm8350.c | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/drivers/leds/leds-wm8350.c b/drivers/leds/leds-wm8350.c index 846ed978103f..38c6bcb07e6c 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, | |||
184 | spin_unlock_irqrestore(&led->value_lock, flags); | 184 | spin_unlock_irqrestore(&led->value_lock, flags); |
185 | } | 185 | } |
186 | 186 | ||
187 | #ifdef CONFIG_PM | ||
188 | static int wm8350_led_suspend(struct platform_device *pdev, pm_message_t state) | ||
189 | { | ||
190 | struct wm8350_led *led = platform_get_drvdata(pdev); | ||
191 | |||
192 | led_classdev_suspend(&led->cdev); | ||
193 | return 0; | ||
194 | } | ||
195 | |||
196 | static int wm8350_led_resume(struct platform_device *pdev) | ||
197 | { | ||
198 | struct wm8350_led *led = platform_get_drvdata(pdev); | ||
199 | |||
200 | led_classdev_resume(&led->cdev); | ||
201 | return 0; | ||
202 | } | ||
203 | #else | ||
204 | #define wm8350_led_suspend NULL | ||
205 | #define wm8350_led_resume NULL | ||
206 | #endif | ||
207 | |||
208 | static void wm8350_led_shutdown(struct platform_device *pdev) | 187 | static void wm8350_led_shutdown(struct platform_device *pdev) |
209 | { | 188 | { |
210 | struct wm8350_led *led = platform_get_drvdata(pdev); | 189 | struct wm8350_led *led = platform_get_drvdata(pdev); |
@@ -255,6 +234,7 @@ static int wm8350_led_probe(struct platform_device *pdev) | |||
255 | led->cdev.brightness_set = wm8350_led_set; | 234 | led->cdev.brightness_set = wm8350_led_set; |
256 | led->cdev.default_trigger = pdata->default_trigger; | 235 | led->cdev.default_trigger = pdata->default_trigger; |
257 | led->cdev.name = pdata->name; | 236 | led->cdev.name = pdata->name; |
237 | led->cdev.flags |= LED_CORE_SUSPENDRESUME; | ||
258 | led->enabled = regulator_is_enabled(isink); | 238 | led->enabled = regulator_is_enabled(isink); |
259 | led->isink = isink; | 239 | led->isink = isink; |
260 | led->dcdc = dcdc; | 240 | led->dcdc = dcdc; |
@@ -311,8 +291,6 @@ static struct platform_driver wm8350_led_driver = { | |||
311 | .probe = wm8350_led_probe, | 291 | .probe = wm8350_led_probe, |
312 | .remove = wm8350_led_remove, | 292 | .remove = wm8350_led_remove, |
313 | .shutdown = wm8350_led_shutdown, | 293 | .shutdown = wm8350_led_shutdown, |
314 | .suspend = wm8350_led_suspend, | ||
315 | .resume = wm8350_led_resume, | ||
316 | }; | 294 | }; |
317 | 295 | ||
318 | static int __devinit wm8350_led_init(void) | 296 | static int __devinit wm8350_led_init(void) |