[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <00d601ce100e$b52bb490$1f831db0$%han@samsung.com>
Date: Thu, 21 Feb 2013 17:37:39 +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 11/12] rtc: rtc-max8997: 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-max8997.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/rtc/rtc-max8997.c b/drivers/rtc/rtc-max8997.c
index a4e7079..00e505b 100644
--- a/drivers/rtc/rtc-max8997.c
+++ b/drivers/rtc/rtc-max8997.c
@@ -495,7 +495,8 @@ static int max8997_rtc_probe(struct platform_device *pdev)
}
info->virq = virq;
- ret = request_threaded_irq(virq, NULL, max8997_rtc_alarm_irq, 0,
+ ret = devm_request_threaded_irq(&pdev->dev, virq, NULL,
+ max8997_rtc_alarm_irq, 0,
"rtc-alarm0", info);
if (ret < 0) {
dev_err(&pdev->dev, "Failed to request alarm IRQ: %d: %d\n",
@@ -514,10 +515,8 @@ static int max8997_rtc_remove(struct platform_device *pdev)
{
struct max8997_rtc_info *info = platform_get_drvdata(pdev);
- if (info) {
- free_irq(info->virq, info);
+ if (info)
rtc_device_unregister(info->rtc_dev);
- }
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@...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