Skip to content

Commit

Permalink
rtc: rtc-tps6586x: use devm_request_threaded_irq()
Browse files Browse the repository at this point in the history
Use devm_request_threaded_irq() to make cleanup paths more simple.

Signed-off-by: Jingoo Han <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Jingoo Han authored and torvalds committed Feb 22, 2013
1 parent 9510853 commit 190ab4a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/rtc/rtc-tps6586x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 190ab4a

Please sign in to comment.