Re: [PATCH v2 7/8] gpiolib: remove gpio_to_chip

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

 



On Tue, Nov 9, 2021 at 11:32 AM Andy Shevchenko
<andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
>
> >  #ifdef CONFIG_GPIOLIB
>
> I'm wondering if we need this ifdeffery at all.

We don't need it for the first half (gpio_set_value, gpio_direction_input, ...),
which could just be unconditional wrappers around the gpiod versions.
Removing that #ifdef would require always including linux/gpio/consumer.h
here, so we'd no longer get a build failure when a driver uses gpiod_*
without including that directly (when GPIOLIB is disabled).

I actually had a patch in my series to do this, but dropped that because
the second half (gpio_request/gpio_free/...) does need the #ifdef

         Arnd



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux