summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAnatolij Gustschin <agust@denx.de>2017-05-11 21:24:31 +0300
committerLinus Walleij <linus.walleij@linaro.org>2017-05-22 11:39:11 +0300
commit020e0b1c8f19f1fc3bce23beeccd80c574ca0e49 (patch)
tree8f0857ab354da8047f04a9b3224f138021885fdb /include
parentb4d2ea2af95cb77e2f320e24da526280d4aa2f6b (diff)
downloadlinux-020e0b1c8f19f1fc3bce23beeccd80c574ca0e49.tar.xz
gpiolib: Add stubs for gpiod lookup table interface
Add stubs for gpiod_add_lookup_table() and gpiod_remove_lookup_table() for the !GPIOLIB case to prevent build errors. Signed-off-by: Anatolij Gustschin <agust@denx.de> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/gpio/machine.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/gpio/machine.h b/include/linux/gpio/machine.h
index c0d712d22b07..f738d50cc17d 100644
--- a/include/linux/gpio/machine.h
+++ b/include/linux/gpio/machine.h
@@ -56,7 +56,14 @@ struct gpiod_lookup_table {
.flags = _flags, \
}
+#ifdef CONFIG_GPIOLIB
void gpiod_add_lookup_table(struct gpiod_lookup_table *table);
void gpiod_remove_lookup_table(struct gpiod_lookup_table *table);
+#else
+static inline
+void gpiod_add_lookup_table(struct gpiod_lookup_table *table) {}
+static inline
+void gpiod_remove_lookup_table(struct gpiod_lookup_table *table) {}
+#endif
#endif /* __LINUX_GPIO_MACHINE_H */