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

From: Jingoo Han
Date: Thu Feb 21 2013 - 03:36:52 EST


Use devm_request_threaded_irq() to make cleanup paths more simple.

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

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;
}
--
1.7.2.5


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