From: Wolfram Sang Date: Thu, 13 Jan 2011 01:00:24 +0000 (-0800) Subject: gpiolib: add missing functions to generic fallback X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5f829e405ec4e96f711165a4a7b55c271d4363e2;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git gpiolib: add missing functions to generic fallback Signed-off-by: Wolfram Sang Cc: David Brownell Cc: Greg KH Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/linux/gpio.h b/include/linux/gpio.h index 1d5214a8911..f79d67f413e 100644 --- a/include/linux/gpio.h +++ b/include/linux/gpio.h @@ -13,6 +13,7 @@ #include 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;