aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-pm8xxx.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/drivers/rtc/rtc-pm8xxx.c b/drivers/rtc/rtc-pm8xxx.c
index cdc9dc211eb0..91ac2e346aea 100644
--- a/drivers/rtc/rtc-pm8xxx.c
+++ b/drivers/rtc/rtc-pm8xxx.c
@@ -434,9 +434,10 @@ static int pm8xxx_rtc_probe(struct platform_device *pdev)
434 } 434 }
435 435
436 /* Request the alarm IRQ */ 436 /* Request the alarm IRQ */
437 rc = request_any_context_irq(rtc_dd->rtc_alarm_irq, 437 rc = devm_request_any_context_irq(&pdev->dev, rtc_dd->rtc_alarm_irq,
438 pm8xxx_alarm_trigger, IRQF_TRIGGER_RISING, 438 pm8xxx_alarm_trigger,
439 "pm8xxx_rtc_alarm", rtc_dd); 439 IRQF_TRIGGER_RISING,
440 "pm8xxx_rtc_alarm", rtc_dd);
440 if (rc < 0) { 441 if (rc < 0) {
441 dev_err(&pdev->dev, "Request IRQ failed (%d)\n", rc); 442 dev_err(&pdev->dev, "Request IRQ failed (%d)\n", rc);
442 return rc; 443 return rc;
@@ -449,16 +450,6 @@ static int pm8xxx_rtc_probe(struct platform_device *pdev)
449 return 0; 450 return 0;
450} 451}
451 452
452static int pm8xxx_rtc_remove(struct platform_device *pdev)
453{
454 struct pm8xxx_rtc *rtc_dd = platform_get_drvdata(pdev);
455
456 device_init_wakeup(&pdev->dev, 0);
457 free_irq(rtc_dd->rtc_alarm_irq, rtc_dd);
458
459 return 0;
460}
461
462#ifdef CONFIG_PM_SLEEP 453#ifdef CONFIG_PM_SLEEP
463static int pm8xxx_rtc_resume(struct device *dev) 454static int pm8xxx_rtc_resume(struct device *dev)
464{ 455{
@@ -487,7 +478,6 @@ static SIMPLE_DEV_PM_OPS(pm8xxx_rtc_pm_ops,
487 478
488static struct platform_driver pm8xxx_rtc_driver = { 479static struct platform_driver pm8xxx_rtc_driver = {
489 .probe = pm8xxx_rtc_probe, 480 .probe = pm8xxx_rtc_probe,
490 .remove = pm8xxx_rtc_remove,
491 .driver = { 481 .driver = {
492 .name = PM8XXX_RTC_DEV_NAME, 482 .name = PM8XXX_RTC_DEV_NAME,
493 .owner = THIS_MODULE, 483 .owner = THIS_MODULE,