Re: [PATCH 2/3] mfd: tqmx86: clear GPIO IRQ resource when no IRQ is set

From: Andy Shevchenko
Date: Wed Mar 31 2021 - 08:36:18 EST


On Wed, Mar 31, 2021 at 2:39 PM Matthias Schiffer
<matthias.schiffer@xxxxxxxxxxxxxxx> wrote:
>
> The driver was registering IRQ 0 when no IRQ was set. This leads to
> warnings with newer kernels.
>
> Clear the resource flags, so no resource is registered at all in this
> case.

...

> /* Assumes the IRQ resource is first. */
> tqmx_gpio_resources[0].start = gpio_irq;
> + } else {
> + tqmx_gpio_resources[0].flags = 0;

Please set IORESOURCE_DISABLED flag in the initial structure instead.

> }


--
With Best Regards,
Andy Shevchenko