diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-02-21 19:45:36 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-21 20:22:30 -0500 |
commit | 190ab4af143d10e7b81a94050d94570b8054a870 (patch) | |
tree | 6a696e02ecc4d4d307f1889e04ac9fcb62b24b47 /drivers/rtc/rtc-tps6586x.c | |
parent | 9510853cfde2223ef39b4a7fbbb7fb100d780661 (diff) |
rtc: rtc-tps6586x: 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 'drivers/rtc/rtc-tps6586x.c')
-rw-r--r-- | drivers/rtc/rtc-tps6586x.c | 4 |
1 files changed, 2 insertions, 2 deletions
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) | |||
282 | goto fail_rtc_register; | 282 | goto fail_rtc_register; |
283 | } | 283 | } |
284 | 284 | ||
285 | ret = request_threaded_irq(rtc->irq, NULL, tps6586x_rtc_irq, | 285 | ret = devm_request_threaded_irq(&pdev->dev, rtc->irq, NULL, |
286 | tps6586x_rtc_irq, | ||
286 | IRQF_ONESHOT | IRQF_EARLY_RESUME, | 287 | IRQF_ONESHOT | IRQF_EARLY_RESUME, |
287 | dev_name(&pdev->dev), rtc); | 288 | dev_name(&pdev->dev), rtc); |
288 | if (ret < 0) { | 289 | if (ret < 0) { |
@@ -311,7 +312,6 @@ static int tps6586x_rtc_remove(struct platform_device *pdev) | |||
311 | tps6586x_update(tps_dev, RTC_CTRL, 0, | 312 | tps6586x_update(tps_dev, RTC_CTRL, 0, |
312 | RTC_ENABLE | OSC_SRC_SEL | PRE_BYPASS | CL_SEL_MASK); | 313 | RTC_ENABLE | OSC_SRC_SEL | PRE_BYPASS | CL_SEL_MASK); |
313 | rtc_device_unregister(rtc->rtc); | 314 | rtc_device_unregister(rtc->rtc); |
314 | free_irq(rtc->irq, rtc); | ||
315 | return 0; | 315 | return 0; |
316 | } | 316 | } |
317 | 317 | ||