* [PATCH] mfd: mt6397: Don't call irq_dispose_mapping.
@ 2019-03-11 7:55 Pi-Hsun Shih
2019-03-24 13:39 ` Alexandre Belloni
0 siblings, 1 reply; 2+ messages in thread
From: Pi-Hsun Shih @ 2019-03-11 7:55 UTC (permalink / raw)
Cc: Pi-Hsun Shih, Eddie Huang, Sean Wang, Alessandro Zummo,
Alexandre Belloni, Matthias Brugger,
moderated list:ARM/Mediatek RTC DRIVER,
moderated list:ARM/Mediatek RTC DRIVER,
open list:REAL TIME CLOCK (RTC) SUBSYSTEM, open list
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: e695d3a0b3b3 ("mfd: mt6397: Create irq mappings in mfd core driver")
Signed-off-by: Pi-Hsun Shih <pihsun@chromium.org>
---
drivers/rtc/rtc-mt6397.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/rtc/rtc-mt6397.c b/drivers/rtc/rtc-mt6397.c
index e9a25ec4d434..c06cf5202e02 100644
--- a/drivers/rtc/rtc-mt6397.c
+++ b/drivers/rtc/rtc-mt6397.c
@@ -343,7 +343,7 @@ static int mtk_rtc_probe(struct platform_device *pdev)
if (ret) {
dev_err(&pdev->dev, "Failed to request alarm IRQ: %d: %d\n",
rtc->irq, ret);
- goto out_dispose_irq;
+ return ret;
}
device_init_wakeup(&pdev->dev, 1);
@@ -359,9 +359,7 @@ static int mtk_rtc_probe(struct platform_device *pdev)
return 0;
out_free_irq:
- free_irq(rtc->irq, rtc->rtc_dev);
-out_dispose_irq:
- irq_dispose_mapping(rtc->irq);
+ free_irq(rtc->irq, rtc);
return ret;
}
@@ -369,8 +367,7 @@ static int mtk_rtc_remove(struct platform_device *pdev)
{
struct mt6397_rtc *rtc = platform_get_drvdata(pdev);
- free_irq(rtc->irq, rtc->rtc_dev);
- irq_dispose_mapping(rtc->irq);
+ free_irq(rtc->irq, rtc);
return 0;
}
--
2.21.0.360.g471c308f928-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mfd: mt6397: Don't call irq_dispose_mapping.
2019-03-11 7:55 [PATCH] mfd: mt6397: Don't call irq_dispose_mapping Pi-Hsun Shih
@ 2019-03-24 13:39 ` Alexandre Belloni
0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Belloni @ 2019-03-24 13:39 UTC (permalink / raw)
To: Pi-Hsun Shih
Cc: Eddie Huang, Sean Wang, Alessandro Zummo, Matthias Brugger,
moderated list:ARM/Mediatek RTC DRIVER,
moderated list:ARM/Mediatek RTC DRIVER,
open list:REAL TIME CLOCK (RTC) SUBSYSTEM, open list
On 11/03/2019 15:55:40+0800, Pi-Hsun Shih wrote:
> 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: e695d3a0b3b3 ("mfd: mt6397: Create irq mappings in mfd core driver")
> Signed-off-by: Pi-Hsun Shih <pihsun@chromium.org>
>
> ---
> drivers/rtc/rtc-mt6397.c | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
Applied, thanks.
--
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-03-24 13:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-11 7:55 [PATCH] mfd: mt6397: Don't call irq_dispose_mapping Pi-Hsun Shih
2019-03-24 13:39 ` Alexandre Belloni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).