summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpiolib.h
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2016-10-03 11:59:32 +0300
committerLinus Walleij <linus.walleij@linaro.org>2016-10-04 00:38:11 +0300
commitf4c1181f0fdeab19fb0b656abfb41bee7ca080b8 (patch)
treeb2249d06e84add71fc8bc9c94b02ab1c875219d4 /drivers/gpio/gpiolib.h
parent031ba28a8197a08e67b12d7ec935b24eb3638345 (diff)
downloadlinux-f4c1181f0fdeab19fb0b656abfb41bee7ca080b8.tar.xz
gpio: OF: localize some gpiochip init functions
of_gpiochip_add() and of_gpiochip_remove() are only used locally in the gpio subsystem so move these functions to the local header. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpiolib.h')
-rw-r--r--drivers/gpio/gpiolib.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpio/gpiolib.h b/drivers/gpio/gpiolib.h
index d4c139ceb0a3..82a91aa66db4 100644
--- a/drivers/gpio/gpiolib.h
+++ b/drivers/gpio/gpiolib.h
@@ -92,6 +92,8 @@ struct gpio_desc *of_find_gpio(struct device *dev,
const char *con_id,
unsigned int idx,
enum gpio_lookup_flags *flags);
+int of_gpiochip_add(struct gpio_chip *gc);
+void of_gpiochip_remove(struct gpio_chip *gc);
#else
static inline struct gpio_desc *of_find_gpio(struct device *dev,
const char *con_id,
@@ -100,6 +102,8 @@ static inline struct gpio_desc *of_find_gpio(struct device *dev,
{
return ERR_PTR(-ENOENT);
}
+static inline int of_gpiochip_add(struct gpio_chip *gc) { return 0; }
+static inline void of_gpiochip_remove(struct gpio_chip *gc) { }
#endif /* CONFIG_OF_GPIO */
#ifdef CONFIG_ACPI