Re: commit f34fd6ee1be8 breaks current dwapb gpio DT users

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Feb 17, 2024 at 6:44 PM Emil Renner Berthing
<emil.renner.berthing@xxxxxxxxxxxxx> wrote:

> --- a/drivers/gpio/gpiolib.c
> +++ b/drivers/gpio/gpiolib.c
> @@ -2042,6 +2042,11 @@ EXPORT_SYMBOL_GPL(gpiochip_generic_free);
>  int gpiochip_generic_config(struct gpio_chip *gc, unsigned int offset,
>                             unsigned long config)
>  {
> +#ifdef CONFIG_PINCTRL

Please do this:

if (IS_ENABLED(CONFIG_PINCTRL) && list_empty(&gc->gpiodev->pin_ranges))
...

The ifdef is so ugly.

> +       if (list_empty(&gc->gpiodev->pin_ranges))
> +               return -ENOTSUPP;
> +#endif

That looks like a reasonable fix, I try to wrap my head around if it
would affect
any users but can't figure it out, we have to test.

Can you please send it as a proper patch? With the above fixed:
Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx>

Yours,
Linus Walleij





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux