aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/gpio.h
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2012-11-06 11:16:39 -0500
committerLinus Walleij <linus.walleij@linaro.org>2012-11-11 13:06:07 -0500
commit50309a9c2e576ac4ad29e30f5854acb87bdc2ac4 (patch)
tree12ded8b5c94195b0a26763f4ba322351463ea423 /include/linux/gpio.h
parent1e63d7b9363f0c57d00991f9f2e0af374dfc591a (diff)
gpiolib: iron out include ladder mistakes
The <*/gpio.h> includes are updated again: now we need to account for the problem introduced by commit: 595679a8038584df7b9398bf34f61db3c038bfea "gpiolib: fix up function prototypes etc" Actually we need static inlines in include/asm-generic/gpio.h as well since we may have GPIOLIB but not PINCTRL. Make sure to move all the CONFIG_PINCTRL business to the end of the file so we are sure we have declared struct gpio_chip. And we need to keep the static inlines in <linux/gpio.h> but here for the !CONFIG_GENERIC_GPIO case, and then we may as well throw in a few warnings like the other prototypes there, if someone would have the bad taste of compiling without GENERIC_GPIO even. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'include/linux/gpio.h')
-rw-r--r--include/linux/gpio.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/include/linux/gpio.h b/include/linux/gpio.h
index 81bbfe5b5de6..7ba2762abbc9 100644
--- a/include/linux/gpio.h
+++ b/include/linux/gpio.h
@@ -231,21 +231,20 @@ static inline int irq_to_gpio(unsigned irq)
231 return -EINVAL; 231 return -EINVAL;
232} 232}
233 233
234#ifdef CONFIG_PINCTRL
235
236static inline int 234static inline int
237gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name, 235gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name,
238 unsigned int pin_base, unsigned int npins) 236 unsigned int pin_base, unsigned int npins)
239{ 237{
238 WARN_ON(1);
239 return -EINVAL;
240} 240}
241 241
242static inline void 242static inline void
243gpiochip_remove_pin_ranges(struct gpio_chip *chip) 243gpiochip_remove_pin_ranges(struct gpio_chip *chip)
244{ 244{
245 WARN_ON(1);
245} 246}
246 247
247#endif /* CONFIG_PINCTRL */
248
249#endif /* ! CONFIG_GENERIC_GPIO */ 248#endif /* ! CONFIG_GENERIC_GPIO */
250 249
251#endif /* __LINUX_GPIO_H */ 250#endif /* __LINUX_GPIO_H */