From: Jingoo Han Date: Fri, 22 Feb 2013 00:45:36 +0000 (-0800) Subject: rtc: rtc-tps6586x: use devm_request_threaded_irq() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=190ab4af143d10e7b81a94050d94570b8054a870;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git rtc: rtc-tps6586x: use devm_request_threaded_irq() Use devm_request_threaded_irq() to make cleanup paths more simple. Signed-off-by: Jingoo Han Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/rtc/rtc-tps6586x.c b/drivers/rtc/rtc-tps6586x.c index 70f61b8e9e6f..aab4e8c93622 100644 --- a/drivers/rtc/rtc-tps6586x.c +++ b/drivers/rtc/rtc-tps6586x.c @@ -282,7 +282,8 @@ static int tps6586x_rtc_probe(struct platform_device *pdev) goto fail_rtc_register; } - ret = request_threaded_irq(rtc->irq, NULL, tps6586x_rtc_irq, + ret = devm_request_threaded_irq(&pdev->dev, rtc->irq, NULL, + tps6586x_rtc_irq, IRQF_ONESHOT | IRQF_EARLY_RESUME, dev_name(&pdev->dev), rtc); if (ret < 0) { @@ -311,7 +312,6 @@ static int tps6586x_rtc_remove(struct platform_device *pdev) tps6586x_update(tps_dev, RTC_CTRL, 0, RTC_ENABLE | OSC_SRC_SEL | PRE_BYPASS | CL_SEL_MASK); rtc_device_unregister(rtc->rtc); - free_irq(rtc->irq, rtc); return 0; }