Skip to contentSkip to conversation

drivers/rtc/rtc-tps65910.c: Add IRQF_ONESHOT to interrupt flags

PATCH In review Saurabh Sengar 2 participants 2 messages Nov 25, 2015 Real time clock (RTC)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/rtc/rtc-tps65910.c: Add IRQF_ONESHOT to interrupt flags

If no primary handler is specified for threaded_irq then a default one is assigned which always returns IRQ_WAKE_THREAD. This handler requires the IRQF_ONESHOT, because the source of interrupt is not disabled

---
 drivers/rtc/rtc-tps65910.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/rtc/rtc-tps65910.c +2 -1
index f42aa2b..9afafde 100644
@@ -268,7 +268,8 @@ static int tps65910_rtc_probe(struct platform_device *pdev)
 	}
 
 	ret = devm_request_threaded_irq(&pdev->dev, irq, NULL,
-		tps65910_rtc_interrupt, IRQF_TRIGGER_LOW | IRQF_EARLY_RESUME,
+		tps65910_rtc_interrupt,
+		IRQF_TRIGGER_LOW | IRQF_EARLY_RESUME | IRQF_ONESHOT,
 		dev_name(&pdev->dev), &pdev->dev);
 	if (ret < 0) {
 		dev_err(&pdev->dev, "IRQ is not free.\n");
Signature · 12 lines
1.9.1

-- 
-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.
#1 lore raw

Hi,

Quoted 5 lines · Saurabh Sengar

If no primary handler is specified for threaded_irq then a default one is assigned which always returns IRQ_WAKE_THREAD. This handler requires the IRQF_ONESHOT, because the source of interrupt is not disabled

Are you sure this is necessary? The parent irqchip is the mfd and it sets IRQF_ONESHOT.

Does that solve a real problem or is it a false positive coming from a static analysis tool?

Signature · 14 lines
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

-- 
-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.