[PATCH 1/2] pinctrl: samsung: Use platform_get_irq_optional() to get the interrupt

Andy Shevchenko andy.shevchenko at gmail.com
Sat Dec 25 07:34:30 PST 2021


On Sat, Dec 25, 2021 at 3:59 AM Lad Prabhakar
<prabhakar.mahadev-lad.rj at bp.renesas.com> wrote:
>
> 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_optional().

> +       ret = platform_get_irq_optional(pdev, 0);
> +       if (ret < 0 && ret != -ENXIO)
> +               return ret;
> +       if (ret > 0)
> +               drvdata->irq = ret;

Yes, this is how platform_get_irq_optional() is expected to be used
right now. We are going to fix it a bit, so this code won't be
affected.

-- 
With Best Regards,
Andy Shevchenko



More information about the linux-arm-kernel mailing list