diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2014-08-19 13:00:53 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2014-08-21 08:44:36 -0400 |
commit | 58b84f6a97f7f8811e0636836734809ff52cad43 (patch) | |
tree | 162a1d981c519433f076244882ce7045a63c635c /include/linux | |
parent | 8a69155040bf8745a9a95da8cbaab2940b4093d5 (diff) |
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: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/gpio/consumer.h | 4 |
1 files 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; | |||
16 | */ | 16 | */ |
17 | struct gpio_desc; | 17 | struct gpio_desc; |
18 | 18 | ||
19 | #ifdef CONFIG_GPIOLIB | ||
20 | |||
21 | #define GPIOD_FLAGS_BIT_DIR_SET BIT(0) | 19 | #define GPIOD_FLAGS_BIT_DIR_SET BIT(0) |
22 | #define GPIOD_FLAGS_BIT_DIR_OUT BIT(1) | 20 | #define GPIOD_FLAGS_BIT_DIR_OUT BIT(1) |
23 | #define GPIOD_FLAGS_BIT_DIR_VAL BIT(2) | 21 | #define GPIOD_FLAGS_BIT_DIR_VAL BIT(2) |
@@ -34,6 +32,8 @@ enum gpiod_flags { | |||
34 | GPIOD_FLAGS_BIT_DIR_VAL, | 32 | GPIOD_FLAGS_BIT_DIR_VAL, |
35 | }; | 33 | }; |
36 | 34 | ||
35 | #ifdef CONFIG_GPIOLIB | ||
36 | |||
37 | /* Acquire and dispose GPIOs */ | 37 | /* Acquire and dispose GPIOs */ |
38 | struct gpio_desc *__must_check __gpiod_get(struct device *dev, | 38 | struct gpio_desc *__must_check __gpiod_get(struct device *dev, |
39 | const char *con_id, | 39 | const char *con_id, |