aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTian Tao <tiantao6@hisilicon.com>2021-04-07 10:18:57 +0800
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2021-04-17 01:04:34 +0200
commit81a0eaf28af6bcf925cee63ba5f6ab4d73c1d072 (patch)
treeeab38915fd279016d3cbac9a50d49b6595c7e783
parent5634f76f6e987e5d5a06cbdc388ca29deda5293d (diff)
downloadlinux-rtc/irqf_no_autoen.tar.gz
rtc: st-lpc: move to use request_irq by IRQF_NO_AUTOEN flagrtc/irqf_no_autoen
disable_irq() after request_irq() still has a time gap in which interrupts can come. request_irq() with IRQF_NO_AUTOEN flag will disable IRQ auto-enable because of requesting. this patch is made base on "add IRQF_NO_AUTOEN for request_irq" which is being merged: https://lore.kernel.org/patchwork/patch/1388765/ Signed-off-by: Tian Tao <tiantao6@hisilicon.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/1617761937-58318-1-git-send-email-tiantao6@hisilicon.com
-rw-r--r--drivers/rtc/rtc-st-lpc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/rtc/rtc-st-lpc.c b/drivers/rtc/rtc-st-lpc.c
index bdb20f63254e26..2df2179f471f5f 100644
--- a/drivers/rtc/rtc-st-lpc.c
+++ b/drivers/rtc/rtc-st-lpc.c
@@ -218,15 +218,14 @@ static int st_rtc_probe(struct platform_device *pdev)
return -EINVAL;
}
- ret = devm_request_irq(&pdev->dev, rtc->irq, st_rtc_handler, 0,
- pdev->name, rtc);
+ ret = devm_request_irq(&pdev->dev, rtc->irq, st_rtc_handler,
+ IRQF_NO_AUTOEN, pdev->name, rtc);
if (ret) {
dev_err(&pdev->dev, "Failed to request irq %i\n", rtc->irq);
return ret;
}
enable_irq_wake(rtc->irq);
- disable_irq(rtc->irq);
rtc->clk = clk_get(&pdev->dev, NULL);
if (IS_ERR(rtc->clk)) {