Commit 6f38b043 authored by Mark Brown's avatar Mark Brown Committed by Linus Torvalds

rtc: convert WM8350 RTC driver to dev_pm_ops

Convert WM8350 RTC driver to dev_pm_ops
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarAlessandro Zummo <a.zummo@towertech.it>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent aeedacae
...@@ -354,8 +354,9 @@ static const struct rtc_class_ops wm8350_rtc_ops = { ...@@ -354,8 +354,9 @@ static const struct rtc_class_ops wm8350_rtc_ops = {
}; };
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int wm8350_rtc_suspend(struct platform_device *pdev, pm_message_t state) static int wm8350_rtc_suspend(struct device *dev)
{ {
struct platform_device *pdev = to_platform_device(dev);
struct wm8350 *wm8350 = dev_get_drvdata(&pdev->dev); struct wm8350 *wm8350 = dev_get_drvdata(&pdev->dev);
int ret = 0; int ret = 0;
u16 reg; u16 reg;
...@@ -373,8 +374,9 @@ static int wm8350_rtc_suspend(struct platform_device *pdev, pm_message_t state) ...@@ -373,8 +374,9 @@ static int wm8350_rtc_suspend(struct platform_device *pdev, pm_message_t state)
return ret; return ret;
} }
static int wm8350_rtc_resume(struct platform_device *pdev) static int wm8350_rtc_resume(struct device *dev)
{ {
struct platform_device *pdev = to_platform_device(dev);
struct wm8350 *wm8350 = dev_get_drvdata(&pdev->dev); struct wm8350 *wm8350 = dev_get_drvdata(&pdev->dev);
int ret; int ret;
...@@ -484,13 +486,17 @@ static int __devexit wm8350_rtc_remove(struct platform_device *pdev) ...@@ -484,13 +486,17 @@ static int __devexit wm8350_rtc_remove(struct platform_device *pdev)
return 0; return 0;
} }
static struct dev_pm_ops wm8350_rtc_pm_ops = {
.suspend = wm8350_rtc_suspend,
.resume = wm8350_rtc_resume,
};
static struct platform_driver wm8350_rtc_driver = { static struct platform_driver wm8350_rtc_driver = {
.probe = wm8350_rtc_probe, .probe = wm8350_rtc_probe,
.remove = __devexit_p(wm8350_rtc_remove), .remove = __devexit_p(wm8350_rtc_remove),
.suspend = wm8350_rtc_suspend,
.resume = wm8350_rtc_resume,
.driver = { .driver = {
.name = "wm8350-rtc", .name = "wm8350-rtc",
.pm = &wm8350_rtc_pm_ops,
}, },
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment