diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-02-22 01:45:41 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-22 02:22:30 +0100 |
commit | fd5231ce336e038037b4f0190a6838bdd6e17c6d (patch) | |
tree | d87ced72da76f30f48c799d8a55c21b4f3348250 /drivers/rtc/rtc-wm831x.c | |
parent | rtc: rtc-tps80031: use devm_request_threaded_irq() (diff) | |
download | linux-fd5231ce336e038037b4f0190a6838bdd6e17c6d.tar.xz linux-fd5231ce336e038037b4f0190a6838bdd6e17c6d.zip |
rtc: rtc-wm831x: 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 '')
-rw-r--r-- | drivers/rtc/rtc-wm831x.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/rtc/rtc-wm831x.c b/drivers/rtc/rtc-wm831x.c index 1b0affbe2659..2f0ac7b30a0c 100644 --- a/drivers/rtc/rtc-wm831x.c +++ b/drivers/rtc/rtc-wm831x.c @@ -443,9 +443,10 @@ static int wm831x_rtc_probe(struct platform_device *pdev) goto err; } - ret = request_threaded_irq(alm_irq, NULL, wm831x_alm_irq, - IRQF_TRIGGER_RISING, "RTC alarm", - wm831x_rtc); + ret = devm_request_threaded_irq(&pdev->dev, alm_irq, NULL, + wm831x_alm_irq, + IRQF_TRIGGER_RISING, "RTC alarm", + wm831x_rtc); if (ret != 0) { dev_err(&pdev->dev, "Failed to request alarm IRQ %d: %d\n", alm_irq, ret); @@ -462,9 +463,7 @@ err: static int wm831x_rtc_remove(struct platform_device *pdev) { struct wm831x_rtc *wm831x_rtc = platform_get_drvdata(pdev); - int alm_irq = platform_get_irq_byname(pdev, "ALM"); - free_irq(alm_irq, wm831x_rtc); rtc_device_unregister(wm831x_rtc->rtc); return 0; |