Re: [PATCH v3 23/24] platform: Modify platform_get_irq_optional() to use resource

Andy Shevchenko
2023-12-27T17:30:47Z

On Tue, Dec 26, 2023 at 12:21:27PM -0700, Mark Hasemeyer wrote:
> Unify handling of ACPI, GPIO, devictree, and platform resource
> interrupts in platform_get_irq_optional(). Each of these subsystems
> provide their own APIs which provide IRQ information as a struct
> resource. This simplifies the logic of the function and allows callers
> to get more information about the IRQ by looking at the resource flags.
> For example, whether or not an IRQ is wake capable.

...

> - struct resource *r;
...
> + struct resource *platform_res = platform_get_resource(dev, IORESOURCE_IRQ, num);

This is quite unusual (as far as cleanup.h is not used and there is no place
for it here).

> +

Unneeded blank line after fixing the above.

> + if (platform_res && platform_res->flags & IORESOURCE_BITS) {
> struct irq_data *irqd;

Otherwise LGTM,
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

--
With Best Regards,
Andy Shevchenko