Commit f4c1181f authored by Linus Walleij's avatar Linus Walleij

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: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 031ba28a
...@@ -92,6 +92,8 @@ struct gpio_desc *of_find_gpio(struct device *dev, ...@@ -92,6 +92,8 @@ struct gpio_desc *of_find_gpio(struct device *dev,
const char *con_id, const char *con_id,
unsigned int idx, unsigned int idx,
enum gpio_lookup_flags *flags); enum gpio_lookup_flags *flags);
int of_gpiochip_add(struct gpio_chip *gc);
void of_gpiochip_remove(struct gpio_chip *gc);
#else #else
static inline struct gpio_desc *of_find_gpio(struct device *dev, static inline struct gpio_desc *of_find_gpio(struct device *dev,
const char *con_id, const char *con_id,
...@@ -100,6 +102,8 @@ static inline struct gpio_desc *of_find_gpio(struct device *dev, ...@@ -100,6 +102,8 @@ static inline struct gpio_desc *of_find_gpio(struct device *dev,
{ {
return ERR_PTR(-ENOENT); 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 */ #endif /* CONFIG_OF_GPIO */
#ifdef CONFIG_ACPI #ifdef CONFIG_ACPI
......
...@@ -61,8 +61,6 @@ static inline int of_mm_gpiochip_add(struct device_node *np, ...@@ -61,8 +61,6 @@ static inline int of_mm_gpiochip_add(struct device_node *np,
} }
extern void of_mm_gpiochip_remove(struct of_mm_gpio_chip *mm_gc); extern void of_mm_gpiochip_remove(struct of_mm_gpio_chip *mm_gc);
extern int of_gpiochip_add(struct gpio_chip *gc);
extern void of_gpiochip_remove(struct gpio_chip *gc);
extern int of_gpio_simple_xlate(struct gpio_chip *gc, extern int of_gpio_simple_xlate(struct gpio_chip *gc,
const struct of_phandle_args *gpiospec, const struct of_phandle_args *gpiospec,
u32 *flags); u32 *flags);
...@@ -86,9 +84,6 @@ static inline int of_gpio_simple_xlate(struct gpio_chip *gc, ...@@ -86,9 +84,6 @@ static inline int of_gpio_simple_xlate(struct gpio_chip *gc,
return -ENOSYS; return -ENOSYS;
} }
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 */ #endif /* CONFIG_OF_GPIO */
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment