aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-04-29 19:19:56 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-29 21:28:32 -0400
commit6975a9c192e1fd28ed0b3ca15559f1e7227f8226 (patch)
tree463f2843e0ecf6aa6fc0b94c0ac16bd5495ca487 /drivers/rtc
parent17581718051076714d72ef24f46dc08402cd5373 (diff)
rtc: rtc-at91rm9200: 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')
-rw-r--r--drivers/rtc/rtc-at91rm9200.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/rtc/rtc-at91rm9200.c b/drivers/rtc/rtc-at91rm9200.c
index f63c8fee73eb..f07bd318260c 100644
--- a/drivers/rtc/rtc-at91rm9200.c
+++ b/drivers/rtc/rtc-at91rm9200.c
@@ -337,7 +337,7 @@ static int __exit at91_rtc_remove(struct platform_device *pdev)
337 return 0; 337 return 0;
338} 338}
339 339
340#ifdef CONFIG_PM 340#ifdef CONFIG_PM_SLEEP
341 341
342/* AT91RM9200 RTC Power management control */ 342/* AT91RM9200 RTC Power management control */
343 343
@@ -369,24 +369,16 @@ static int at91_rtc_resume(struct device *dev)
369 } 369 }
370 return 0; 370 return 0;
371} 371}
372
373static const struct dev_pm_ops at91_rtc_pm = {
374 .suspend = at91_rtc_suspend,
375 .resume = at91_rtc_resume,
376};
377
378#define at91_rtc_pm_ptr &at91_rtc_pm
379
380#else
381#define at91_rtc_pm_ptr NULL
382#endif 372#endif
383 373
374static SIMPLE_DEV_PM_OPS(at91_rtc_pm_ops, at91_rtc_suspend, at91_rtc_resume);
375
384static struct platform_driver at91_rtc_driver = { 376static struct platform_driver at91_rtc_driver = {
385 .remove = __exit_p(at91_rtc_remove), 377 .remove = __exit_p(at91_rtc_remove),
386 .driver = { 378 .driver = {
387 .name = "at91_rtc", 379 .name = "at91_rtc",
388 .owner = THIS_MODULE, 380 .owner = THIS_MODULE,
389 .pm = at91_rtc_pm_ptr, 381 .pm = &at91_rtc_pm_ops,
390 }, 382 },
391}; 383};
392 384