Patchwork [09/12] rtc: rtc-palmas: use devm_request_threaded_irq()

login
register
mail settings
Submitter Jingoo Han
Date Feb. 21, 2013, 8:36 a.m.
Message ID <00d401ce100e$94f05cd0$bed11670$%han@samsung.com>
Download mbox | patch
Permalink /patch/222205/
State New
Headers show

Comments

Jingoo Han - Feb. 21, 2013, 8:36 a.m.
Use devm_request_threaded_irq() to make cleanup paths more simple.

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

Patch

diff --git a/drivers/rtc/rtc-palmas.c b/drivers/rtc/rtc-palmas.c
index 59c4298..df9359c 100644
--- a/drivers/rtc/rtc-palmas.c
+++ b/drivers/rtc/rtc-palmas.c
@@ -272,7 +272,7 @@  static int palmas_rtc_probe(struct platform_device *pdev)
 		return ret;
 	}
 
-	ret = request_threaded_irq(palmas_rtc->irq, NULL,
+	ret = devm_request_threaded_irq(&pdev->dev, palmas_rtc->irq, NULL,
 			palmas_rtc_interrupt,
 			IRQF_TRIGGER_LOW | IRQF_ONESHOT |
 			IRQF_EARLY_RESUME,
@@ -292,7 +292,6 @@  static int palmas_rtc_remove(struct platform_device *pdev)
 	struct palmas_rtc *palmas_rtc = platform_get_drvdata(pdev);
 
 	palmas_rtc_alarm_irq_enable(&pdev->dev, 0);
-	free_irq(palmas_rtc->irq, palmas_rtc);
 	rtc_device_unregister(palmas_rtc->rtc);
 	return 0;
 }