summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorHaojian Zhuang <haojian.zhuang@marvell.com>2009-07-21 14:31:09 +0800
committerEric Miao <eric.y.miao@gmail.com>2009-09-10 19:15:35 +0800
commit5d027cd222a052923a511ba693b60e512b3866f2 (patch)
tree278306dcc24dc127c8bcbf7e5cb213644d405eeb /drivers
parente6e698a4fb3cbeef9f478f9f165998246d9b1b0b (diff)
downloadop-kernel-dev-5d027cd222a052923a511ba693b60e512b3866f2.zip
op-kernel-dev-5d027cd222a052923a511ba693b60e512b3866f2.tar.gz
[ARM] pxa: update rtc-sa1100.c to use 'struct dev_pm_ops'
Remove the following warning: Platform driver 'sa1100-rtc' needs updating - please use dev_pm_ops Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/rtc/rtc-sa1100.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/drivers/rtc/rtc-sa1100.c b/drivers/rtc/rtc-sa1100.c
index 4f247e4..dbd07c3 100644
--- a/drivers/rtc/rtc-sa1100.c
+++ b/drivers/rtc/rtc-sa1100.c
@@ -393,31 +393,34 @@ static int sa1100_rtc_remove(struct platform_device *pdev)
}
#ifdef CONFIG_PM
-static int sa1100_rtc_suspend(struct platform_device *pdev, pm_message_t state)
+static int sa1100_rtc_suspend(struct device *dev)
{
- if (device_may_wakeup(&pdev->dev))
+ if (device_may_wakeup(dev))
enable_irq_wake(IRQ_RTCAlrm);
return 0;
}
-static int sa1100_rtc_resume(struct platform_device *pdev)
+static int sa1100_rtc_resume(struct device *dev)
{
- if (device_may_wakeup(&pdev->dev))
+ if (device_may_wakeup(dev))
disable_irq_wake(IRQ_RTCAlrm);
return 0;
}
-#else
-#define sa1100_rtc_suspend NULL
-#define sa1100_rtc_resume NULL
+
+static struct dev_pm_ops sa1100_rtc_pm_ops = {
+ .suspend = sa1100_rtc_suspend,
+ .resume = sa1100_rtc_resume,
+};
#endif
static struct platform_driver sa1100_rtc_driver = {
.probe = sa1100_rtc_probe,
.remove = sa1100_rtc_remove,
- .suspend = sa1100_rtc_suspend,
- .resume = sa1100_rtc_resume,
.driver = {
- .name = "sa1100-rtc",
+ .name = "sa1100-rtc",
+#ifdef CONFIG_PM
+ .pm = &sa1100_rtc_pm_ops,
+#endif
},
};
OpenPOWER on IntegriCloud