mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Josh Cartwright <joshc@codeaurora.org>
To: Alessandro Zummo <a.zummo@towertech.it>
Cc: linux-arm-msm@vger.kernel.org,
	Stephen Boyd <sboyd@codeaurora.org>,
	rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org
Subject: [PATCH 3/6] rtc: pm8xxx: use devm_request_any_context_irq
Date: Wed,  5 Mar 2014 13:29:33 -0600	[thread overview]
Message-ID: <1394047776-13827-4-git-send-email-joshc@codeaurora.org> (raw)
In-Reply-To: <1394047776-13827-1-git-send-email-joshc@codeaurora.org>

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>
---
 drivers/rtc/rtc-pm8xxx.c | 18 ++++--------------
 1 file changed, 4 insertions(+), 14 deletions(-)

diff --git a/drivers/rtc/rtc-pm8xxx.c b/drivers/rtc/rtc-pm8xxx.c
index f6d140a..ed3fe83 100644
--- a/drivers/rtc/rtc-pm8xxx.c
+++ b/drivers/rtc/rtc-pm8xxx.c
@@ -427,9 +427,10 @@ static int pm8xxx_rtc_probe(struct platform_device *pdev)
 	}
 
 	/* Request the alarm IRQ */
-	rc = request_any_context_irq(rtc_dd->rtc_alarm_irq,
-				     pm8xxx_alarm_trigger, IRQF_TRIGGER_RISING,
-				     "pm8xxx_rtc_alarm", rtc_dd);
+	rc = devm_request_any_context_irq(&pdev->dev, rtc_dd->rtc_alarm_irq,
+					  pm8xxx_alarm_trigger,
+					  IRQF_TRIGGER_RISING,
+					  "pm8xxx_rtc_alarm", rtc_dd);
 	if (rc < 0) {
 		dev_err(&pdev->dev, "Request IRQ failed (%d)\n", rc);
 		return rc;
@@ -442,16 +443,6 @@ static int pm8xxx_rtc_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int pm8xxx_rtc_remove(struct platform_device *pdev)
-{
-	struct pm8xxx_rtc *rtc_dd = platform_get_drvdata(pdev);
-
-	device_init_wakeup(&pdev->dev, 0);
-	free_irq(rtc_dd->rtc_alarm_irq, rtc_dd);
-
-	return 0;
-}
-
 #ifdef CONFIG_PM_SLEEP
 static int pm8xxx_rtc_resume(struct device *dev)
 {
@@ -480,7 +471,6 @@ static SIMPLE_DEV_PM_OPS(pm8xxx_rtc_pm_ops,
 
 static struct platform_driver pm8xxx_rtc_driver = {
 	.probe		= pm8xxx_rtc_probe,
-	.remove		= pm8xxx_rtc_remove,
 	.driver	= {
 		.name	= PM8XXX_RTC_DEV_NAME,
 		.owner	= THIS_MODULE,
-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation


  parent reply	other threads:[~2014-03-05 19:32 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1394047776-13827-1-git-send-email-joshc@codeaurora.org>
2014-03-05 19:29 ` [PATCH 1/6] rtc: pm8xxx: fixup checkpatch/style issues Josh Cartwright
2014-03-05 21:02   ` Stephen Boyd
2014-03-05 21:54     ` Joe Perches
2014-03-05 23:51     ` Josh Cartwright
2014-03-05 19:29 ` [PATCH 2/6] rtc: pm8xxx: use regmap API for register accesses Josh Cartwright
2014-03-05 20:59   ` Stephen Boyd
2014-03-05 19:29 ` Josh Cartwright [this message]
2014-03-05 20:59   ` [PATCH 3/6] rtc: pm8xxx: use devm_request_any_context_irq Stephen Boyd
2014-03-05 19:29 ` [PATCH 4/6] rtc: pm8xxx: add support for devicetree Josh Cartwright
2014-03-05 20:59   ` Stephen Boyd
2014-03-06  9:18   ` Lee Jones
2014-03-05 19:29 ` [PATCH 5/6] rtc: pm8xxx: move device_init_wakeup() before rtc_register Josh Cartwright
2014-03-05 20:59   ` Stephen Boyd
2014-03-05 19:29 ` [PATCH 6/6] documentation: bindings: document PMIC8921/8058 RTC Josh Cartwright
2014-03-05 20:58   ` Stephen Boyd
2014-03-06  0:00     ` Josh Cartwright
2014-03-06  1:31       ` Stephen Boyd
2014-03-07 19:01         ` Josh Cartwright
2014-03-10 15:35       ` Rob Herring
2014-03-10 17:05         ` Josh Cartwright

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1394047776-13827-4-git-send-email-joshc@codeaurora.org \
    --to=joshc@codeaurora.org \
    --cc=a.zummo@towertech.it \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rtc-linux@googlegroups.com \
    --cc=sboyd@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome