diff options
Diffstat (limited to 'drivers/rtc/rtc-wm831x.c')
-rw-r--r-- | drivers/rtc/rtc-wm831x.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/rtc/rtc-wm831x.c b/drivers/rtc/rtc-wm831x.c index 1b0affbe2659..2f0ac7b30a0c 100644 --- a/drivers/rtc/rtc-wm831x.c +++ b/drivers/rtc/rtc-wm831x.c | |||
@@ -443,9 +443,10 @@ static int wm831x_rtc_probe(struct platform_device *pdev) | |||
443 | goto err; | 443 | goto err; |
444 | } | 444 | } |
445 | 445 | ||
446 | ret = request_threaded_irq(alm_irq, NULL, wm831x_alm_irq, | 446 | ret = devm_request_threaded_irq(&pdev->dev, alm_irq, NULL, |
447 | IRQF_TRIGGER_RISING, "RTC alarm", | 447 | wm831x_alm_irq, |
448 | wm831x_rtc); | 448 | IRQF_TRIGGER_RISING, "RTC alarm", |
449 | wm831x_rtc); | ||
449 | if (ret != 0) { | 450 | if (ret != 0) { |
450 | dev_err(&pdev->dev, "Failed to request alarm IRQ %d: %d\n", | 451 | dev_err(&pdev->dev, "Failed to request alarm IRQ %d: %d\n", |
451 | alm_irq, ret); | 452 | alm_irq, ret); |
@@ -462,9 +463,7 @@ err: | |||
462 | static int wm831x_rtc_remove(struct platform_device *pdev) | 463 | static int wm831x_rtc_remove(struct platform_device *pdev) |
463 | { | 464 | { |
464 | struct wm831x_rtc *wm831x_rtc = platform_get_drvdata(pdev); | 465 | struct wm831x_rtc *wm831x_rtc = platform_get_drvdata(pdev); |
465 | int alm_irq = platform_get_irq_byname(pdev, "ALM"); | ||
466 | 466 | ||
467 | free_irq(alm_irq, wm831x_rtc); | ||
468 | rtc_device_unregister(wm831x_rtc->rtc); | 467 | rtc_device_unregister(wm831x_rtc->rtc); |
469 | 468 | ||
470 | return 0; | 469 | return 0; |