diff options
author | Wolfram Sang <w.sang@pengutronix.de> | 2011-01-13 02:00:24 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-13 17:03:15 +0100 |
commit | 5f829e405ec4e96f711165a4a7b55c271d4363e2 (patch) | |
tree | 366c02d4d085a486546b1e071efdd51f161b2267 /include | |
parent | gpiolib: annotate gpio-intialization with __must_check (diff) | |
download | linux-5f829e405ec4e96f711165a4a7b55c271d4363e2.tar.xz linux-5f829e405ec4e96f711165a4a7b55c271d4363e2.zip |
gpiolib: add missing functions to generic fallback
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Greg KH <gregkh@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/gpio.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/linux/gpio.h b/include/linux/gpio.h index 1d5214a89110..f79d67f413e4 100644 --- a/include/linux/gpio.h +++ b/include/linux/gpio.h @@ -13,6 +13,7 @@ #include <linux/errno.h> struct device; +struct gpio; struct gpio_chip; /* @@ -34,6 +35,17 @@ static inline int __must_check gpio_request(unsigned gpio, const char *label) return -ENOSYS; } +static inline int __must_check gpio_request_one(unsigned gpio, + unsigned long flags, const char *label) +{ + return -ENOSYS; +} + +static inline int __must_check gpio_request_array(struct gpio *array, size_t num) +{ + return -ENOSYS; +} + static inline void gpio_free(unsigned gpio) { might_sleep(); @@ -42,6 +54,14 @@ static inline void gpio_free(unsigned gpio) WARN_ON(1); } +static inline void gpio_free_array(struct gpio *array, size_t num) +{ + might_sleep(); + + /* GPIO can never have been requested */ + WARN_ON(1); +} + static inline int __must_check gpio_direction_input(unsigned gpio) { return -ENOSYS; |