Commit 190ab4af authored by Jingoo Han's avatar Jingoo Han Committed by Linus Torvalds

rtc: rtc-tps6586x: use devm_request_threaded_irq()

Use devm_request_threaded_irq() to make cleanup paths more simple.
Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 9510853c
...@@ -282,7 +282,8 @@ static int tps6586x_rtc_probe(struct platform_device *pdev) ...@@ -282,7 +282,8 @@ static int tps6586x_rtc_probe(struct platform_device *pdev)
goto fail_rtc_register; 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, IRQF_ONESHOT | IRQF_EARLY_RESUME,
dev_name(&pdev->dev), rtc); dev_name(&pdev->dev), rtc);
if (ret < 0) { if (ret < 0) {
...@@ -311,7 +312,6 @@ static int tps6586x_rtc_remove(struct platform_device *pdev) ...@@ -311,7 +312,6 @@ static int tps6586x_rtc_remove(struct platform_device *pdev)
tps6586x_update(tps_dev, RTC_CTRL, 0, tps6586x_update(tps_dev, RTC_CTRL, 0,
RTC_ENABLE | OSC_SRC_SEL | PRE_BYPASS | CL_SEL_MASK); RTC_ENABLE | OSC_SRC_SEL | PRE_BYPASS | CL_SEL_MASK);
rtc_device_unregister(rtc->rtc); rtc_device_unregister(rtc->rtc);
free_irq(rtc->irq, rtc);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment