diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-04-29 19:19:57 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-29 21:28:32 -0400 |
commit | 75634cc495401d9f368b13cef4128a81ccace515 (patch) | |
tree | d38f9beb216eb3d82bb8a19726bbe30b9b793a39 /drivers/rtc/rtc-mxc.c | |
parent | 6975a9c192e1fd28ed0b3ca15559f1e7227f8226 (diff) |
rtc: rtc-mxc: 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: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc/rtc-mxc.c')
-rw-r--r-- | drivers/rtc/rtc-mxc.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/rtc/rtc-mxc.c b/drivers/rtc/rtc-mxc.c index 13380ca3651c..9a3895bc4f4d 100644 --- a/drivers/rtc/rtc-mxc.c +++ b/drivers/rtc/rtc-mxc.c | |||
@@ -470,7 +470,7 @@ static int mxc_rtc_remove(struct platform_device *pdev) | |||
470 | return 0; | 470 | return 0; |
471 | } | 471 | } |
472 | 472 | ||
473 | #ifdef CONFIG_PM | 473 | #ifdef CONFIG_PM_SLEEP |
474 | static int mxc_rtc_suspend(struct device *dev) | 474 | static int mxc_rtc_suspend(struct device *dev) |
475 | { | 475 | { |
476 | struct rtc_plat_data *pdata = dev_get_drvdata(dev); | 476 | struct rtc_plat_data *pdata = dev_get_drvdata(dev); |
@@ -490,19 +490,14 @@ static int mxc_rtc_resume(struct device *dev) | |||
490 | 490 | ||
491 | return 0; | 491 | return 0; |
492 | } | 492 | } |
493 | |||
494 | static struct dev_pm_ops mxc_rtc_pm_ops = { | ||
495 | .suspend = mxc_rtc_suspend, | ||
496 | .resume = mxc_rtc_resume, | ||
497 | }; | ||
498 | #endif | 493 | #endif |
499 | 494 | ||
495 | static SIMPLE_DEV_PM_OPS(mxc_rtc_pm_ops, mxc_rtc_suspend, mxc_rtc_resume); | ||
496 | |||
500 | static struct platform_driver mxc_rtc_driver = { | 497 | static struct platform_driver mxc_rtc_driver = { |
501 | .driver = { | 498 | .driver = { |
502 | .name = "mxc_rtc", | 499 | .name = "mxc_rtc", |
503 | #ifdef CONFIG_PM | ||
504 | .pm = &mxc_rtc_pm_ops, | 500 | .pm = &mxc_rtc_pm_ops, |
505 | #endif | ||
506 | .owner = THIS_MODULE, | 501 | .owner = THIS_MODULE, |
507 | }, | 502 | }, |
508 | .id_table = imx_rtc_devtype, | 503 | .id_table = imx_rtc_devtype, |