提交 05020a73 编写于 作者: L Lad Prabhakar 提交者: Alexandre Belloni

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: NLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: NLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20211220011524.17206-1-prabhakar.mahadev-lad.rj@bp.renesas.com
上级 ba52eac0
...@@ -141,11 +141,9 @@ static int ftrtc010_rtc_probe(struct platform_device *pdev) ...@@ -141,11 +141,9 @@ static int ftrtc010_rtc_probe(struct platform_device *pdev)
} }
} }
res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); rtc->rtc_irq = platform_get_irq(pdev, 0);
if (!res) if (rtc->rtc_irq < 0)
return -ENODEV; return rtc->rtc_irq;
rtc->rtc_irq = res->start;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) if (!res)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册