diff options
Diffstat (limited to 'drivers/rtc/rtc-pxa.c')
-rw-r--r-- | drivers/rtc/rtc-pxa.c | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/drivers/rtc/rtc-pxa.c b/drivers/rtc/rtc-pxa.c index 03c85ee719a7..ed037ae91c5f 100644 --- a/drivers/rtc/rtc-pxa.c +++ b/drivers/rtc/rtc-pxa.c | |||
@@ -416,7 +416,7 @@ static struct of_device_id pxa_rtc_dt_ids[] = { | |||
416 | MODULE_DEVICE_TABLE(of, pxa_rtc_dt_ids); | 416 | MODULE_DEVICE_TABLE(of, pxa_rtc_dt_ids); |
417 | #endif | 417 | #endif |
418 | 418 | ||
419 | #ifdef CONFIG_PM | 419 | #ifdef CONFIG_PM_SLEEP |
420 | static int pxa_rtc_suspend(struct device *dev) | 420 | static int pxa_rtc_suspend(struct device *dev) |
421 | { | 421 | { |
422 | struct pxa_rtc *pxa_rtc = dev_get_drvdata(dev); | 422 | struct pxa_rtc *pxa_rtc = dev_get_drvdata(dev); |
@@ -434,36 +434,20 @@ static int pxa_rtc_resume(struct device *dev) | |||
434 | disable_irq_wake(pxa_rtc->irq_Alrm); | 434 | disable_irq_wake(pxa_rtc->irq_Alrm); |
435 | return 0; | 435 | return 0; |
436 | } | 436 | } |
437 | |||
438 | static const struct dev_pm_ops pxa_rtc_pm_ops = { | ||
439 | .suspend = pxa_rtc_suspend, | ||
440 | .resume = pxa_rtc_resume, | ||
441 | }; | ||
442 | #endif | 437 | #endif |
443 | 438 | ||
439 | static SIMPLE_DEV_PM_OPS(pxa_rtc_pm_ops, pxa_rtc_suspend, pxa_rtc_resume); | ||
440 | |||
444 | static struct platform_driver pxa_rtc_driver = { | 441 | static struct platform_driver pxa_rtc_driver = { |
445 | .remove = __exit_p(pxa_rtc_remove), | 442 | .remove = __exit_p(pxa_rtc_remove), |
446 | .driver = { | 443 | .driver = { |
447 | .name = "pxa-rtc", | 444 | .name = "pxa-rtc", |
448 | .of_match_table = of_match_ptr(pxa_rtc_dt_ids), | 445 | .of_match_table = of_match_ptr(pxa_rtc_dt_ids), |
449 | #ifdef CONFIG_PM | ||
450 | .pm = &pxa_rtc_pm_ops, | 446 | .pm = &pxa_rtc_pm_ops, |
451 | #endif | ||
452 | }, | 447 | }, |
453 | }; | 448 | }; |
454 | 449 | ||
455 | static int __init pxa_rtc_init(void) | 450 | module_platform_driver_probe(pxa_rtc_driver, pxa_rtc_probe); |
456 | { | ||
457 | return platform_driver_probe(&pxa_rtc_driver, pxa_rtc_probe); | ||
458 | } | ||
459 | |||
460 | static void __exit pxa_rtc_exit(void) | ||
461 | { | ||
462 | platform_driver_unregister(&pxa_rtc_driver); | ||
463 | } | ||
464 | |||
465 | module_init(pxa_rtc_init); | ||
466 | module_exit(pxa_rtc_exit); | ||
467 | 451 | ||
468 | MODULE_AUTHOR("Robert Jarzmik <robert.jarzmik@free.fr>"); | 452 | MODULE_AUTHOR("Robert Jarzmik <robert.jarzmik@free.fr>"); |
469 | MODULE_DESCRIPTION("PXA27x/PXA3xx Realtime Clock Driver (RTC)"); | 453 | MODULE_DESCRIPTION("PXA27x/PXA3xx Realtime Clock Driver (RTC)"); |