Skip to contentSkip to conversation

gpiolib: Add stubs for gpiod lookup table interface

PATCH In review Anatolij Gustschin 3 participants 5 messages May 11, 2017 – May 22, 2017 GPIO

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 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.

---
Changes in v4:
- move stubs to gpio/machine.h

Changes in v3:
- add stubs for !GPIOLIB case. Drop prototypes, these are already in gpio/machine.h

Changes in v2:
- move gpiod_lookup_table out of #ifdef

 include/linux/gpio/machine.h | 7 +++++++
 1 file changed, 7 insertions(+)
include/linux/gpio/machine.h +7 -0
index c0d712d..f738d50 100644
@@ -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 */
Signature · 1 line
2.7.4
Reviewed-by on v4 1/1
#1 lore raw
Quoted 3 lines · Anatolij Gustschin

Add stubs for gpiod_add_lookup_table() and gpiod_remove_lookup_table() for the !GPIOLIB case to prevent build errors.

Thanks!

FWIW:

It will fix this kbuild bot complain: https://lkml.org/lkml/2017/4/2/209

Quoted 37 lines

---
Changes in v4:
- move stubs to gpio/machine.h

Changes in v3:
- add stubs for !GPIOLIB case. Drop prototypes, these are already in gpio/machine.h

Changes in v2:
- move gpiod_lookup_table out of #ifdef

 include/linux/gpio/machine.h | 7 +++++++
 1 file changed, 7 insertions(+)
include/linux/gpio/machine.h +7 -1
index c0d712d..f738d50 100644
@@ -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 */
--

2.7.4

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#4 lore raw
Quoted 7 lines · Anatolij Gustschin

On Fri, 12 May 2017 11:27:42 +0200
Linus Walleij [email protected] wrote:
...

Quoted 1 line

Patch applied for fixes with Andy's Review tag.

Thanks! What about this one https://lkml.org/lkml/2017/4/20/907 ? Any issues with it? Or can it be queued for v4.13?

It was probably not sent to me (just to the mailing list?) or some other hickup. I will try to find it min my mailbox.

Yours,
Linus Walleij