aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2015-12-04 09:13:53 -0500
committerLinus Walleij <linus.walleij@linaro.org>2016-01-05 05:20:12 -0500
commit3208b0f0c010b26e4d461a3bca59989d03ed9087 (patch)
tree780145509a890886443fa03fa9ef0444725f51ae /include/linux
parentb08ea35a3296ee25c4cb53a977b752266dafa2c2 (diff)
gpio: of: provide optional of_mm_gpiochip_add_data() function
In the same spirit as we add an optional void *data argument to the gpiochip_add_data() call, we need this also for of_mm_gpiochip_add(). Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/of_gpio.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/linux/of_gpio.h b/include/linux/of_gpio.h
index bb85a8eeba6a..092186c62ff4 100644
--- a/include/linux/of_gpio.h
+++ b/include/linux/of_gpio.h
@@ -51,8 +51,14 @@ static inline struct of_mm_gpio_chip *to_of_mm_gpio_chip(struct gpio_chip *gc)
51extern int of_get_named_gpio_flags(struct device_node *np, 51extern int of_get_named_gpio_flags(struct device_node *np,
52 const char *list_name, int index, enum of_gpio_flags *flags); 52 const char *list_name, int index, enum of_gpio_flags *flags);
53 53
54extern int of_mm_gpiochip_add(struct device_node *np, 54extern int of_mm_gpiochip_add_data(struct device_node *np,
55 struct of_mm_gpio_chip *mm_gc); 55 struct of_mm_gpio_chip *mm_gc,
56 void *data);
57static inline int of_mm_gpiochip_add(struct device_node *np,
58 struct of_mm_gpio_chip *mm_gc)
59{
60 return of_mm_gpiochip_add_data(np, mm_gc, NULL);
61}
56extern 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);
57 63
58extern int of_gpiochip_add(struct gpio_chip *gc); 64extern int of_gpiochip_add(struct gpio_chip *gc);