aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShuah Khan <[email protected]>2013-09-11 14:23:11 -0700
committerLinus Torvalds <[email protected]>2013-09-11 15:58:15 -0700
commita8a3808b43a077fbc738b26dc84d18b5db3044f9 (patch)
tree1806bbf4ca57911c3f7c69bc73411a4f48e862ad
parent729377d559607ea40d714e8f7092f40f643cf01f (diff)
rtc: convert rtc-cmos to dev_pm_ops from legacy pm_ops
Convert drivers/rtc/rtc-cmos to use dev_pm_ops instead of legacy pm_ops. This patch depends on pnp driver bus ops change to invoke pnp_driver dev_pm_ops. Signed-off-by: Shuah Khan <[email protected]> Cc: Matthew Garrett <[email protected]> Cc: Leonidas Da Silva Barbosa <[email protected]> Cc: Ashley Lai <[email protected]> Cc: Rajiv Andrade <[email protected]> Cc: Marcel Selhorst <[email protected]> Cc: Sirrix AG <[email protected]> Cc: Alessandro Zummo <[email protected]> Cc: "Rafael J. Wysocki" <[email protected]> Cc: Bjorn Helgaas <[email protected]> Cc: Grant Likely <[email protected]> Cc: Rob Herring <[email protected]> Cc: Peter Hüwe <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r--drivers/rtc/rtc-cmos.c24
1 files changed, 5 insertions, 19 deletions
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c
index be06d7150de5..24e733c98f8b 100644
--- a/drivers/rtc/rtc-cmos.c
+++ b/drivers/rtc/rtc-cmos.c
@@ -1018,23 +1018,6 @@ static void __exit cmos_pnp_remove(struct pnp_dev *pnp)
cmos_do_remove(&pnp->dev);
}
-#ifdef CONFIG_PM
-
-static int cmos_pnp_suspend(struct pnp_dev *pnp, pm_message_t mesg)
-{
- return cmos_suspend(&pnp->dev);
-}
-
-static int cmos_pnp_resume(struct pnp_dev *pnp)
-{
- return cmos_resume(&pnp->dev);
-}
-
-#else
-#define cmos_pnp_suspend NULL
-#define cmos_pnp_resume NULL
-#endif
-
static void cmos_pnp_shutdown(struct pnp_dev *pnp)
{
if (system_state == SYSTEM_POWER_OFF && !cmos_poweroff(&pnp->dev))
@@ -1060,8 +1043,11 @@ static struct pnp_driver cmos_pnp_driver = {
/* flag ensures resume() gets called, and stops syslog spam */
.flags = PNP_DRIVER_RES_DO_NOT_CHANGE,
- .suspend = cmos_pnp_suspend,
- .resume = cmos_pnp_resume,
+#ifdef CONFIG_PM_SLEEP
+ .driver = {
+ .pm = &cmos_pm_ops,
+ },
+#endif
};
#endif /* CONFIG_PNP */