Commit c5a40618 authored by Jingoo Han's avatar Jingoo Han Committed by Linus Torvalds

rtc: rtc-pxa: switch to using SIMPLE_DEV_PM_OPS

Switch to using the SIMPLE_DEV_PM_OPS macro to declare the driver's
pm_ops.  It reduces code size.
Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 75634cc4
...@@ -416,7 +416,7 @@ static struct of_device_id pxa_rtc_dt_ids[] = { ...@@ -416,7 +416,7 @@ static struct of_device_id pxa_rtc_dt_ids[] = {
MODULE_DEVICE_TABLE(of, pxa_rtc_dt_ids); MODULE_DEVICE_TABLE(of, pxa_rtc_dt_ids);
#endif #endif
#ifdef CONFIG_PM #ifdef CONFIG_PM_SLEEP
static int pxa_rtc_suspend(struct device *dev) static int pxa_rtc_suspend(struct device *dev)
{ {
struct pxa_rtc *pxa_rtc = dev_get_drvdata(dev); struct pxa_rtc *pxa_rtc = dev_get_drvdata(dev);
...@@ -434,21 +434,16 @@ static int pxa_rtc_resume(struct device *dev) ...@@ -434,21 +434,16 @@ static int pxa_rtc_resume(struct device *dev)
disable_irq_wake(pxa_rtc->irq_Alrm); disable_irq_wake(pxa_rtc->irq_Alrm);
return 0; return 0;
} }
static const struct dev_pm_ops pxa_rtc_pm_ops = {
.suspend = pxa_rtc_suspend,
.resume = pxa_rtc_resume,
};
#endif #endif
static SIMPLE_DEV_PM_OPS(pxa_rtc_pm_ops, pxa_rtc_suspend, pxa_rtc_resume);
static struct platform_driver pxa_rtc_driver = { static struct platform_driver pxa_rtc_driver = {
.remove = __exit_p(pxa_rtc_remove), .remove = __exit_p(pxa_rtc_remove),
.driver = { .driver = {
.name = "pxa-rtc", .name = "pxa-rtc",
.of_match_table = of_match_ptr(pxa_rtc_dt_ids), .of_match_table = of_match_ptr(pxa_rtc_dt_ids),
#ifdef CONFIG_PM
.pm = &pxa_rtc_pm_ops, .pm = &pxa_rtc_pm_ops,
#endif
}, },
}; };
......
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