aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Cartwright <joshc@codeaurora.org>2014-04-03 17:50:12 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-03 19:21:23 -0400
commitbffcbc0887a7496c19639d55ff0e7483ee17aa42 (patch)
tree983397ddbb10e1ee6c0f835ebbda9694fc6d9d34
parent5d7dc4cf14da184fb7aca8f298e9667746e9f980 (diff)
rtc: pm8xxx: use devm_request_any_context_irq
Make use of the devm_* variant of request_any_context_irq to allow for elimination of remove(). Signed-off-by: Josh Cartwright <joshc@codeaurora.org> Reviewed-by: Stephen Boyd <sboyd@codeaurora.org> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-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,