Skip to content

Commit 020e0b1

Browse files
vdsaoLinus Walleij
authored andcommitted
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>
1 parent b4d2ea2 commit 020e0b1

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎include/linux/gpio/machine.h‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,14 @@ struct gpiod_lookup_table {
5656
.flags = _flags, \
5757
}
5858

59+
#ifdef CONFIG_GPIOLIB
5960
void gpiod_add_lookup_table(struct gpiod_lookup_table *table);
6061
void gpiod_remove_lookup_table(struct gpiod_lookup_table *table);
62+
#else
63+
static inline
64+
void gpiod_add_lookup_table(struct gpiod_lookup_table *table) {}
65+
static inline
66+
void gpiod_remove_lookup_table(struct gpiod_lookup_table *table) {}
67+
#endif
6168

6269
#endif /* __LINUX_GPIO_MACHINE_H */

0 commit comments

Comments
 (0)