diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-12-15 19:46:09 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-16 10:19:59 -0500 |
commit | 6f38b0436f7f0f0626d1f078edf4c38b0802b8f8 (patch) | |
tree | a20fddda831dd155e39d894ad9686896e1b978fd | |
parent | aeedacaeaf9c02dddfeb6af87bef80c96f9050cb (diff) |
rtc: convert WM8350 RTC driver to dev_pm_ops
Convert WM8350 RTC driver to dev_pm_ops
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | drivers/rtc/rtc-wm8350.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/rtc/rtc-wm8350.c b/drivers/rtc/rtc-wm8350.c index f16486635a8e..f1e440521c54 100644 --- a/drivers/rtc/rtc-wm8350.c +++ b/drivers/rtc/rtc-wm8350.c | |||
@@ -354,8 +354,9 @@ static const struct rtc_class_ops wm8350_rtc_ops = { | |||
354 | }; | 354 | }; |
355 | 355 | ||
356 | #ifdef CONFIG_PM | 356 | #ifdef CONFIG_PM |
357 | static int wm8350_rtc_suspend(struct platform_device *pdev, pm_message_t state) | 357 | static int wm8350_rtc_suspend(struct device *dev) |
358 | { | 358 | { |
359 | struct platform_device *pdev = to_platform_device(dev); | ||
359 | struct wm8350 *wm8350 = dev_get_drvdata(&pdev->dev); | 360 | struct wm8350 *wm8350 = dev_get_drvdata(&pdev->dev); |
360 | int ret = 0; | 361 | int ret = 0; |
361 | u16 reg; | 362 | u16 reg; |
@@ -373,8 +374,9 @@ static int wm8350_rtc_suspend(struct platform_device *pdev, pm_message_t state) | |||
373 | return ret; | 374 | return ret; |
374 | } | 375 | } |
375 | 376 | ||
376 | static int wm8350_rtc_resume(struct platform_device *pdev) | 377 | static int wm8350_rtc_resume(struct device *dev) |
377 | { | 378 | { |
379 | struct platform_device *pdev = to_platform_device(dev); | ||
378 | struct wm8350 *wm8350 = dev_get_drvdata(&pdev->dev); | 380 | struct wm8350 *wm8350 = dev_get_drvdata(&pdev->dev); |
379 | int ret; | 381 | int ret; |
380 | 382 | ||
@@ -484,13 +486,17 @@ static int __devexit wm8350_rtc_remove(struct platform_device *pdev) | |||
484 | return 0; | 486 | return 0; |
485 | } | 487 | } |
486 | 488 | ||
489 | static struct dev_pm_ops wm8350_rtc_pm_ops = { | ||
490 | .suspend = wm8350_rtc_suspend, | ||
491 | .resume = wm8350_rtc_resume, | ||
492 | }; | ||
493 | |||
487 | static struct platform_driver wm8350_rtc_driver = { | 494 | static struct platform_driver wm8350_rtc_driver = { |
488 | .probe = wm8350_rtc_probe, | 495 | .probe = wm8350_rtc_probe, |
489 | .remove = __devexit_p(wm8350_rtc_remove), | 496 | .remove = __devexit_p(wm8350_rtc_remove), |
490 | .suspend = wm8350_rtc_suspend, | ||
491 | .resume = wm8350_rtc_resume, | ||
492 | .driver = { | 497 | .driver = { |
493 | .name = "wm8350-rtc", | 498 | .name = "wm8350-rtc", |
499 | .pm = &wm8350_rtc_pm_ops, | ||
494 | }, | 500 | }, |
495 | }; | 501 | }; |
496 | 502 | ||