Skip to content

Commit

Permalink
gpio: move GPIOD flags outside #ifdef
Browse files Browse the repository at this point in the history
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.

Reported-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Linus Walleij committed Aug 21, 2014
1 parent 8a69155 commit 58b84f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/linux/gpio/consumer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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,
Expand Down

0 comments on commit 58b84f6

Please sign in to comment.