diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-03-01 08:55:20 +0100 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-03-01 08:55:20 +0100 |
commit | 35858adbfca13678af99fb31618ef4428d6dedb0 (patch) | |
tree | 3336feaa61324486945816cb52c347733e7c0821 /drivers/rtc/rtc-wm8350.c | |
parent | Input: winbond-cir - fix suspend/resume (diff) | |
parent | Input: atkbd - release previously reserved keycodes 248 - 254 (diff) | |
download | linux-35858adbfca13678af99fb31618ef4428d6dedb0.tar.xz linux-35858adbfca13678af99fb31618ef4428d6dedb0.zip |
Merge branch 'next' into for-linus
Diffstat (limited to 'drivers/rtc/rtc-wm8350.c')
-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 = { }; #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); int ret = 0; u16 reg; @@ -373,8 +374,9 @@ static int wm8350_rtc_suspend(struct platform_device *pdev, pm_message_t state) 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); int ret; @@ -484,13 +486,17 @@ static int __devexit wm8350_rtc_remove(struct platform_device *pdev) 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 = { .probe = wm8350_rtc_probe, .remove = __devexit_p(wm8350_rtc_remove), - .suspend = wm8350_rtc_suspend, - .resume = wm8350_rtc_resume, .driver = { .name = "wm8350-rtc", + .pm = &wm8350_rtc_pm_ops, }, }; |