Re: [PATCH] gpio: move GPIOD flags outside #ifdef

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

 



On Tue, Aug 19, 2014 at 10:03 AM, Linus Walleij
<linus.walleij@xxxxxxxxxx> wrote:
> The GPIOD flags are defined inside the #ifdef CONFIG_GPIOLIB
> switch, making the gpiolib stubs fail if these flags are used
> by a consumer. This is not correct: the stubs should compile
> fine without GPIOLIB.

Oops, sorry about this.

Reviewed-by: Alexandre Courbot <acourbot@xxxxxxxxxx>

>
> Cc: Alexandre Courbot <gnurou@xxxxxxxxx>
> Reported-by: Ulf Hansson <ulf.hansson@xxxxxxxxxx>
> Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
> ---
>  include/linux/gpio/consumer.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/gpio/consumer.h b/include/linux/gpio/consumer.h
> index b7ce0c64c6f3..c7e17de732f3 100644
> --- a/include/linux/gpio/consumer.h
> +++ b/include/linux/gpio/consumer.h
> @@ -16,8 +16,6 @@ struct device;
>   */
>  struct gpio_desc;
>
> -#ifdef CONFIG_GPIOLIB
> -
>  #define GPIOD_FLAGS_BIT_DIR_SET                BIT(0)
>  #define GPIOD_FLAGS_BIT_DIR_OUT                BIT(1)
>  #define GPIOD_FLAGS_BIT_DIR_VAL                BIT(2)
> @@ -34,6 +32,8 @@ enum gpiod_flags {
>                           GPIOD_FLAGS_BIT_DIR_VAL,
>  };
>
> +#ifdef CONFIG_GPIOLIB
> +
>  /* Acquire and dispose GPIOs */
>  struct gpio_desc *__must_check __gpiod_get(struct device *dev,
>                                          const char *con_id,
> --
> 1.9.3
>
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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