Skip to content

Commit 05020a7

Browse files
prabhakarladalexandrebelloni
authored andcommitted
rtc: ftrtc010: Use platform_get_irq() to get the interrupt
platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static allocation of IRQ resources in DT core code, this causes an issue when using hierarchical interrupt domains using "interrupts" property in the node as this bypasses the hierarchical setup and messes up the irq chaining. In preparation for removal of static setup of IRQ resource from DT core code use platform_get_irq(). Signed-off-by: Lad Prabhakar <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent ba52eac commit 05020a7

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

drivers/rtc/rtc-ftrtc010.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,9 @@ static int ftrtc010_rtc_probe(struct platform_device *pdev)
141141
}
142142
}
143143

144-
res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
145-
if (!res)
146-
return -ENODEV;
147-
148-
rtc->rtc_irq = res->start;
144+
rtc->rtc_irq = platform_get_irq(pdev, 0);
145+
if (rtc->rtc_irq < 0)
146+
return rtc->rtc_irq;
149147

150148
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
151149
if (!res)

0 commit comments

Comments
 (0)