linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gpio: move GPIOD flags outside #ifdef
@ 2014-08-19 17:03 Linus Walleij
  2014-08-19 17:04 ` Alexandre Courbot
  0 siblings, 1 reply; 2+ messages in thread
From: Linus Walleij @ 2014-08-19 17:03 UTC (permalink / raw)
  To: linux-gpio; +Cc: Alexandre Courbot, Linus Walleij, Alexandre Courbot

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.

Cc: Alexandre Courbot <gnurou@gmail.com>
Reported-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] gpio: move GPIOD flags outside #ifdef
  2014-08-19 17:03 [PATCH] gpio: move GPIOD flags outside #ifdef Linus Walleij
@ 2014-08-19 17:04 ` Alexandre Courbot
  0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Courbot @ 2014-08-19 17:04 UTC (permalink / raw)
  To: Linus Walleij; +Cc: linux-gpio@vger.kernel.org, Alexandre Courbot

On Tue, Aug 19, 2014 at 10:03 AM, Linus Walleij
<linus.walleij@linaro.org> 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@nvidia.com>

>
> Cc: Alexandre Courbot <gnurou@gmail.com>
> Reported-by: Ulf Hansson <ulf.hansson@linaro.org>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
>  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
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-08-19 17:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-19 17:03 [PATCH] gpio: move GPIOD flags outside #ifdef Linus Walleij
2014-08-19 17:04 ` Alexandre Courbot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).