linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Josh Cartwright <joshc@codeaurora.org>
To: Andrew Morton <akpm@linux-foundation.org>,
	Alessandro Zummo <a.zummo@towertech.it>
Cc: linux-arm-msm@vger.kernel.org, rtc-linux@googlegroups.com,
	linux-kernel@vger.kernel.org
Subject: [PATCH v2 3/6] rtc: pm8xxx: use devm_request_any_context_irq
Date: Mon, 10 Mar 2014 13:44:46 -0500	[thread overview]
Message-ID: <1394477089-3996-4-git-send-email-joshc@codeaurora.org> (raw)
In-Reply-To: <1394477089-3996-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>
Reviewed-by: Stephen Boyd <sboyd@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 cdc9dc2..91ac2e3 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)
 	}
 
 	/* 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;
@@ -449,16 +450,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)
 {
@@ -487,7 +478,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-10 18:47 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-10 18:44 [PATCH v2 0/6] rtc: make the pm8xxx RTC driver usable Josh Cartwright
2014-03-10 18:44 ` [PATCH v2 1/6] rtc: pm8xxx: fixup checkpatch/style issues Josh Cartwright
2014-03-10 18:44 ` [PATCH v2 2/6] rtc: pm8xxx: use regmap API for register accesses Josh Cartwright
2014-03-10 20:47   ` Andrew Morton
2014-03-10 21:35     ` Josh Cartwright
2014-03-10 21:43       ` Andrew Morton
2014-03-10 23:32       ` Mark Brown
2014-03-10 18:44 ` Josh Cartwright [this message]
2014-03-10 18:44 ` [PATCH v2 4/6] rtc: pm8xxx: add support for devicetree Josh Cartwright
2014-03-10 20:47   ` Andrew Morton
2014-03-10 21:56     ` Josh Cartwright
2014-03-10 18:44 ` [PATCH v2 5/6] rtc: pm8xxx: move device_init_wakeup() before rtc_register Josh Cartwright
2014-03-10 18:44 ` [PATCH v2 6/6] documentation: bindings: document PMIC8921/8058 RTC Josh Cartwright
2014-03-10 21:22   ` Rob Herring
     [not found]     ` <CAL_JsqJe7M6i0RKWVPHbvyHbHscMtZmW-xbJuaJTePqYRKWrUg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-03-10 22:11       ` Josh Cartwright
2014-03-10 22:18         ` Andrew Morton
     [not found]           ` <20140310151807.7274d58d3c50b884585244b6-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
2014-03-12 17:17             ` [PATCH v3 6/6] mfd: devicetree: bindings: add pm8xxx RTC description Josh Cartwright
2014-03-21  8:12               ` Lee Jones

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=1394477089-3996-4-git-send-email-joshc@codeaurora.org \
    --to=joshc@codeaurora.org \
    --cc=a.zummo@towertech.it \
    --cc=akpm@linux-foundation.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rtc-linux@googlegroups.com \
    /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;
as well as URLs for NNTP newsgroup(s).