aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2016-10-03 04:59:32 -0400
committerLinus Walleij <linus.walleij@linaro.org>2016-10-03 17:38:11 -0400
commitf4c1181f0fdeab19fb0b656abfb41bee7ca080b8 (patch)
treeb2249d06e84add71fc8bc9c94b02ab1c875219d4
parent031ba28a8197a08e67b12d7ec935b24eb3638345 (diff)
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>
-rw-r--r--drivers/gpio/gpiolib.h4
-rw-r--r--include/linux/of_gpio.h5
2 files changed, 4 insertions, 5 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,
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);
95int of_gpiochip_add(struct gpio_chip *gc);
96void of_gpiochip_remove(struct gpio_chip *gc);
95#else 97#else
96static inline struct gpio_desc *of_find_gpio(struct device *dev, 98static inline struct gpio_desc *of_find_gpio(struct device *dev,
97 const char *con_id, 99 const char *con_id,
@@ -100,6 +102,8 @@ static inline struct gpio_desc *of_find_gpio(struct device *dev,
100{ 102{
101 return ERR_PTR(-ENOENT); 103 return ERR_PTR(-ENOENT);
102} 104}
105static inline int of_gpiochip_add(struct gpio_chip *gc) { return 0; }
106static inline void of_gpiochip_remove(struct gpio_chip *gc) { }
103#endif /* CONFIG_OF_GPIO */ 107#endif /* CONFIG_OF_GPIO */
104 108
105#ifdef CONFIG_ACPI 109#ifdef CONFIG_ACPI
diff --git a/include/linux/of_gpio.h b/include/linux/of_gpio.h
index 092186c62ff4..3f87ea5b8bee 100644
--- a/include/linux/of_gpio.h
+++ b/include/linux/of_gpio.h
@@ -61,8 +61,6 @@ static inline int of_mm_gpiochip_add(struct device_node *np,
61} 61}
62extern void of_mm_gpiochip_remove(struct of_mm_gpio_chip *mm_gc); 62extern void of_mm_gpiochip_remove(struct of_mm_gpio_chip *mm_gc);
63 63
64extern int of_gpiochip_add(struct gpio_chip *gc);
65extern void of_gpiochip_remove(struct gpio_chip *gc);
66extern int of_gpio_simple_xlate(struct gpio_chip *gc, 64extern int of_gpio_simple_xlate(struct gpio_chip *gc,
67 const struct of_phandle_args *gpiospec, 65 const struct of_phandle_args *gpiospec,
68 u32 *flags); 66 u32 *flags);
@@ -86,9 +84,6 @@ static inline int of_gpio_simple_xlate(struct gpio_chip *gc,
86 return -ENOSYS; 84 return -ENOSYS;
87} 85}
88 86
89static inline int of_gpiochip_add(struct gpio_chip *gc) { return 0; }
90static inline void of_gpiochip_remove(struct gpio_chip *gc) { }
91
92#endif /* CONFIG_OF_GPIO */ 87#endif /* CONFIG_OF_GPIO */
93 88
94/** 89/**