lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 21 Feb 2013 17:34:47 +0900
From:	Jingoo Han <jg1.han@...sung.com>
To:	'Andrew Morton' <akpm@...ux-foundation.org>
Cc:	linux-kernel@...r.kernel.org,
	'Alessandro Zummo' <a.zummo@...ertech.it>,
	rtc-linux@...glegroups.com, 'Jingoo Han' <jg1.han@...sung.com>
Subject: [PATCH 05/12] rtc: rtc-lp8788: use devm_request_threaded_irq()

Use devm_request_threaded_irq() to make cleanup paths more simple.

Signed-off-by: Jingoo Han <jg1.han@...sung.com>
---
 drivers/rtc/rtc-lp8788.c |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/rtc/rtc-lp8788.c b/drivers/rtc/rtc-lp8788.c
index 4a4e78e..9a46312 100644
--- a/drivers/rtc/rtc-lp8788.c
+++ b/drivers/rtc/rtc-lp8788.c
@@ -278,16 +278,11 @@ static int lp8788_alarm_irq_register(struct platform_device *pdev,
 
 	rtc->irq = irq_create_mapping(irqdm, irq);
 
-	return request_threaded_irq(rtc->irq, NULL, lp8788_alarm_irq_handler,
+	return devm_request_threaded_irq(&pdev->dev, rtc->irq, NULL,
+				lp8788_alarm_irq_handler,
 				0, LP8788_ALM_IRQ, rtc);
 }
 
-static void lp8788_alarm_irq_unregister(struct lp8788_rtc *rtc)
-{
-	if (rtc->irq)
-		free_irq(rtc->irq, rtc);
-}
-
 static int lp8788_rtc_probe(struct platform_device *pdev)
 {
 	struct lp8788 *lp = dev_get_drvdata(pdev->dev.parent);
@@ -321,7 +316,6 @@ static int lp8788_rtc_remove(struct platform_device *pdev)
 {
 	struct lp8788_rtc *rtc = platform_get_drvdata(pdev);
 
-	lp8788_alarm_irq_unregister(rtc);
 	rtc_device_unregister(rtc->rdev);
 	platform_set_drvdata(pdev, NULL);
 
-- 
1.7.2.5


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ