diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-02-21 16:45:44 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-21 17:22:30 -0800 |
commit | c1879fe80c61f3be6f2ddb82509c2e7f92a484fe (patch) | |
tree | 8155de84f0acc322f032389552b4cb4136bc461c /drivers/rtc/rtc-max8997.c | |
parent | 83a72c87e9d52820e9d3058004874af4df377a4d (diff) |
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@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc/rtc-max8997.c')
-rw-r--r-- | 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 a4e7079fb863..00e505b6bee3 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; } |