]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
rtc: rtc-palmas: use devm_request_threaded_irq()
authorJingoo Han <jg1.han@samsung.com>
Wed, 20 Mar 2013 04:08:12 +0000 (15:08 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 21 Mar 2013 05:34:18 +0000 (16:34 +1100)
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>
drivers/rtc/rtc-palmas.c

index bb86bb72782b1131b296b1e6626764c8e4e4a060..bbc3b9efdeb21fa930f11eae9ad80c310c389af4 100644 (file)
@@ -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,
@@ -289,7 +289,6 @@ static int palmas_rtc_probe(struct platform_device *pdev)
 static int palmas_rtc_remove(struct platform_device *pdev)
 {
        palmas_rtc_alarm_irq_enable(&pdev->dev, 0);
-       free_irq(palmas_rtc->irq, palmas_rtc);
        return 0;
 }