diff options
Diffstat (limited to 'drivers/rtc/rtc-max8997.c')
-rw-r--r-- | drivers/rtc/rtc-max8997.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/rtc/rtc-max8997.c b/drivers/rtc/rtc-max8997.c index a4e7079fb863..00e505b6bee3 100644 --- a/drivers/rtc/rtc-max8997.c +++ b/drivers/rtc/rtc-max8997.c | |||
@@ -495,7 +495,8 @@ static int max8997_rtc_probe(struct platform_device *pdev) | |||
495 | } | 495 | } |
496 | info->virq = virq; | 496 | info->virq = virq; |
497 | 497 | ||
498 | ret = request_threaded_irq(virq, NULL, max8997_rtc_alarm_irq, 0, | 498 | ret = devm_request_threaded_irq(&pdev->dev, virq, NULL, |
499 | max8997_rtc_alarm_irq, 0, | ||
499 | "rtc-alarm0", info); | 500 | "rtc-alarm0", info); |
500 | if (ret < 0) { | 501 | if (ret < 0) { |
501 | dev_err(&pdev->dev, "Failed to request alarm IRQ: %d: %d\n", | 502 | dev_err(&pdev->dev, "Failed to request alarm IRQ: %d: %d\n", |
@@ -514,10 +515,8 @@ static int max8997_rtc_remove(struct platform_device *pdev) | |||
514 | { | 515 | { |
515 | struct max8997_rtc_info *info = platform_get_drvdata(pdev); | 516 | struct max8997_rtc_info *info = platform_get_drvdata(pdev); |
516 | 517 | ||
517 | if (info) { | 518 | if (info) |
518 | free_irq(info->virq, info); | ||
519 | rtc_device_unregister(info->rtc_dev); | 519 | rtc_device_unregister(info->rtc_dev); |
520 | } | ||
521 | 520 | ||
522 | return 0; | 521 | return 0; |
523 | } | 522 | } |