aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2016-10-03 05:37:24 -0400
committerLinus Walleij <linus.walleij@linaro.org>2016-10-03 17:38:11 -0400
commite0852940662362a641c059610755169e3852b873 (patch)
treedd68b8152bcb0fc74d2e12ae83e5ff243ed092b5 /drivers/gpio
parentf4c1181f0fdeab19fb0b656abfb41bee7ca080b8 (diff)
gpio: add missing static inline
of_get_named_gpiod_flags() was missing a static inline version when compiling without OF_GPIO. Add this. Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpiolib.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/gpio/gpiolib.h b/drivers/gpio/gpiolib.h
index 82a91aa66db4..346fbda39220 100644
--- a/drivers/gpio/gpiolib.h
+++ b/drivers/gpio/gpiolib.h
@@ -92,6 +92,8 @@ struct gpio_desc *of_find_gpio(struct device *dev,
92 const char *con_id, 92 const char *con_id,
93 unsigned int idx, 93 unsigned int idx,
94 enum gpio_lookup_flags *flags); 94 enum gpio_lookup_flags *flags);
95struct gpio_desc *of_get_named_gpiod_flags(struct device_node *np,
96 const char *list_name, int index, enum of_gpio_flags *flags);
95int of_gpiochip_add(struct gpio_chip *gc); 97int of_gpiochip_add(struct gpio_chip *gc);
96void of_gpiochip_remove(struct gpio_chip *gc); 98void of_gpiochip_remove(struct gpio_chip *gc);
97#else 99#else
@@ -102,6 +104,11 @@ static inline struct gpio_desc *of_find_gpio(struct device *dev,
102{ 104{
103 return ERR_PTR(-ENOENT); 105 return ERR_PTR(-ENOENT);
104} 106}
107static inline struct gpio_desc *of_get_named_gpiod_flags(struct device_node *np,
108 const char *list_name, int index, enum of_gpio_flags *flags)
109{
110 return ERR_PTR(-ENOENT);
111}
105static inline int of_gpiochip_add(struct gpio_chip *gc) { return 0; } 112static inline int of_gpiochip_add(struct gpio_chip *gc) { return 0; }
106static inline void of_gpiochip_remove(struct gpio_chip *gc) { } 113static inline void of_gpiochip_remove(struct gpio_chip *gc) { }
107#endif /* CONFIG_OF_GPIO */ 114#endif /* CONFIG_OF_GPIO */
@@ -160,9 +167,6 @@ static inline bool acpi_can_fallback_to_crs(struct acpi_device *adev,
160} 167}
161#endif 168#endif
162 169
163struct gpio_desc *of_get_named_gpiod_flags(struct device_node *np,
164 const char *list_name, int index, enum of_gpio_flags *flags);
165
166struct gpio_desc *gpiochip_get_desc(struct gpio_chip *chip, u16 hwnum); 170struct gpio_desc *gpiochip_get_desc(struct gpio_chip *chip, u16 hwnum);
167void gpiod_set_array_value_complex(bool raw, bool can_sleep, 171void gpiod_set_array_value_complex(bool raw, bool can_sleep,
168 unsigned int array_size, 172 unsigned int array_size,