Commit fe7005a0 authored by Pi-Hsun Shih's avatar Pi-Hsun Shih Committed by Greg Kroah-Hartman

rtc: mt6397: Don't call irq_dispose_mapping.

[ Upstream commit 24db953e ]

The IRQ mapping was changed to not being created in the rtc-mt6397
driver, so the irq_dispose_mapping is no longer needed.
Also the dev_id passed to free_irq should be the same as the last
argument passed to request_threaded_irq.
This prevents a "Trying to free already-free IRQ 274" warning when
unbinding the driver.

Fixes: e695d3a0 ("mfd: mt6397: Create irq mappings in mfd core driver")
Signed-off-by: default avatarPi-Hsun Shih <pihsun@chromium.org>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent af06cc1c
...@@ -362,7 +362,7 @@ static int mtk_rtc_probe(struct platform_device *pdev) ...@@ -362,7 +362,7 @@ static int mtk_rtc_probe(struct platform_device *pdev)
if (ret) { if (ret) {
dev_err(&pdev->dev, "Failed to request alarm IRQ: %d: %d\n", dev_err(&pdev->dev, "Failed to request alarm IRQ: %d: %d\n",
rtc->irq, ret); rtc->irq, ret);
goto out_dispose_irq; return ret;
} }
device_init_wakeup(&pdev->dev, 1); device_init_wakeup(&pdev->dev, 1);
...@@ -378,9 +378,7 @@ static int mtk_rtc_probe(struct platform_device *pdev) ...@@ -378,9 +378,7 @@ static int mtk_rtc_probe(struct platform_device *pdev)
return 0; return 0;
out_free_irq: out_free_irq:
free_irq(rtc->irq, rtc->rtc_dev); free_irq(rtc->irq, rtc);
out_dispose_irq:
irq_dispose_mapping(rtc->irq);
return ret; return ret;
} }
...@@ -388,8 +386,7 @@ static int mtk_rtc_remove(struct platform_device *pdev) ...@@ -388,8 +386,7 @@ static int mtk_rtc_remove(struct platform_device *pdev)
{ {
struct mt6397_rtc *rtc = platform_get_drvdata(pdev); struct mt6397_rtc *rtc = platform_get_drvdata(pdev);
free_irq(rtc->irq, rtc->rtc_dev); free_irq(rtc->irq, rtc);
irq_dispose_mapping(rtc->irq);
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