Skip to contentSkip to conversation

+ rtc-pm8xxx-use-devm_request_any_context_irq.patch added to -mm tree

PATCH [email protected] 1 participant 1 message Mar 10, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Subject: + rtc-pm8xxx-use-devm_request_any_context_irq.patch added to -mm tree
To: [email protected],[email protected],[email protected]
From: [email protected]
Date: Mon, 10 Mar 2014 13:48:04 -0700

The patch titled
Subject: rtc: pm8xxx: use devm_request_any_context_irq
has been added to the -mm tree. Its filename is
rtc-pm8xxx-use-devm_request_any_context_irq.patch

This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/rtc-pm8xxx-use-devm_request_any_context_irq.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/rtc-pm8xxx-use-devm_request_any_context_irq.patch

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated there every 3-4 working days

------------------------------------------------------
From: Josh Cartwright <[email protected]>
Subject: 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().

---

 drivers/rtc/rtc-pm8xxx.c |   18 ++++--------------
 1 file changed, 4 insertions(+), 14 deletions(-)
drivers/rtc/rtc-pm8xxx.c renamed from drivers/rtc/rtc-pm8xxx.c~rtc-pm8xxx-use-devm_request_any_context_irq +4 -12
diff -puN drivers/rtc/rtc-pm8xxx.c~rtc-pm8xxx-use-devm_request_any_context_irq drivers/rtc/rtc-pm8xxx.c
@@ -434,9 +434,10 @@ static int pm8xxx_rtc_probe(struct platf
 	}
 
 	/* 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 platf
 	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;
-}