diff options
Diffstat (limited to 'drivers/rtc/rtc-88pm860x.c')
-rw-r--r-- | drivers/rtc/rtc-88pm860x.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/rtc/rtc-88pm860x.c b/drivers/rtc/rtc-88pm860x.c index 2c809a1a445e88..31439a63046441 100644 --- a/drivers/rtc/rtc-88pm860x.c +++ b/drivers/rtc/rtc-88pm860x.c @@ -344,7 +344,6 @@ static int pm860x_rtc_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM_SLEEP static int pm860x_rtc_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); @@ -363,14 +362,14 @@ static int pm860x_rtc_resume(struct device *dev) chip->wakeup_flag &= ~(1 << PM8607_IRQ_RTC); return 0; } -#endif -static SIMPLE_DEV_PM_OPS(pm860x_rtc_pm_ops, pm860x_rtc_suspend, pm860x_rtc_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(pm860x_rtc_pm_ops, + pm860x_rtc_suspend, pm860x_rtc_resume); static struct platform_driver pm860x_rtc_driver = { .driver = { .name = "88pm860x-rtc", - .pm = &pm860x_rtc_pm_ops, + .pm = pm_sleep_ptr(&pm860x_rtc_pm_ops), }, .probe = pm860x_rtc_probe, .remove = pm860x_rtc_remove, |