Commit 58b84f6a authored by Linus Walleij's avatar Linus Walleij

gpio: move GPIOD flags outside #ifdef

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: default avatarUlf Hansson <ulf.hansson@linaro.org>
Reviewed-by: default avatarAlexandre Courbot <acourbot@nvidia.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 8a691550
...@@ -16,8 +16,6 @@ struct device; ...@@ -16,8 +16,6 @@ struct device;
*/ */
struct gpio_desc; struct gpio_desc;
#ifdef CONFIG_GPIOLIB
#define GPIOD_FLAGS_BIT_DIR_SET BIT(0) #define GPIOD_FLAGS_BIT_DIR_SET BIT(0)
#define GPIOD_FLAGS_BIT_DIR_OUT BIT(1) #define GPIOD_FLAGS_BIT_DIR_OUT BIT(1)
#define GPIOD_FLAGS_BIT_DIR_VAL BIT(2) #define GPIOD_FLAGS_BIT_DIR_VAL BIT(2)
...@@ -34,6 +32,8 @@ enum gpiod_flags { ...@@ -34,6 +32,8 @@ enum gpiod_flags {
GPIOD_FLAGS_BIT_DIR_VAL, GPIOD_FLAGS_BIT_DIR_VAL,
}; };
#ifdef CONFIG_GPIOLIB
/* Acquire and dispose GPIOs */ /* Acquire and dispose GPIOs */
struct gpio_desc *__must_check __gpiod_get(struct device *dev, struct gpio_desc *__must_check __gpiod_get(struct device *dev,
const char *con_id, const char *con_id,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment