linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4] gpiolib: Add stubs for gpiod lookup table interface
@ 2017-05-11 18:24 Anatolij Gustschin
  2017-05-11 19:02 ` Andy Shevchenko
  2017-05-12  9:27 ` Linus Walleij
  0 siblings, 2 replies; 5+ messages in thread
From: Anatolij Gustschin @ 2017-05-11 18:24 UTC (permalink / raw)
  To: linus.walleij, gnurou; +Cc: andy.shevchenko, linux-gpio, linux-kernel

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>
---
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(+)

diff --git a/include/linux/gpio/machine.h b/include/linux/gpio/machine.h
index c0d712d..f738d50 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 */
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v4] gpiolib: Add stubs for gpiod lookup table interface
  2017-05-11 18:24 [PATCH v4] gpiolib: Add stubs for gpiod lookup table interface Anatolij Gustschin
@ 2017-05-11 19:02 ` Andy Shevchenko
  2017-05-12  9:27 ` Linus Walleij
  1 sibling, 0 replies; 5+ messages in thread
From: Andy Shevchenko @ 2017-05-11 19:02 UTC (permalink / raw)
  To: Anatolij Gustschin
  Cc: Linus Walleij, Alexandre Courbot, linux-gpio, linux-kernel

On Thu, May 11, 2017 at 9:24 PM, Anatolij Gustschin <agust@denx.de> wrote:
> Add stubs for gpiod_add_lookup_table() and gpiod_remove_lookup_table()
> for the !GPIOLIB case to prevent build errors.
>

Thanks!

FWIW:
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>

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

> Signed-off-by: Anatolij Gustschin <agust@denx.de>
> ---
> 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(+)
>
> diff --git a/include/linux/gpio/machine.h b/include/linux/gpio/machine.h
> index c0d712d..f738d50 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 */
> --
> 2.7.4
>



-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v4] gpiolib: Add stubs for gpiod lookup table interface
  2017-05-11 18:24 [PATCH v4] gpiolib: Add stubs for gpiod lookup table interface Anatolij Gustschin
  2017-05-11 19:02 ` Andy Shevchenko
@ 2017-05-12  9:27 ` Linus Walleij
  2017-05-12  9:38   ` Anatolij Gustschin
  1 sibling, 1 reply; 5+ messages in thread
From: Linus Walleij @ 2017-05-12  9:27 UTC (permalink / raw)
  To: Anatolij Gustschin
  Cc: Alexandre Courbot, Andy Shevchenko, linux-gpio, linux-kernel

On Thu, May 11, 2017 at 8:24 PM, Anatolij Gustschin <agust@denx.de> wrote:

> 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>

Patch applied for fixes with Andy's Review tag.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v4] gpiolib: Add stubs for gpiod lookup table interface
  2017-05-12  9:27 ` Linus Walleij
@ 2017-05-12  9:38   ` Anatolij Gustschin
  2017-05-22  8:54     ` Linus Walleij
  0 siblings, 1 reply; 5+ messages in thread
From: Anatolij Gustschin @ 2017-05-12  9:38 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Alexandre Courbot, Andy Shevchenko, linux-gpio, linux-kernel

On Fri, 12 May 2017 11:27:42 +0200
Linus Walleij linus.walleij@linaro.org wrote:
...
>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?

Thanks,
Anatolij

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v4] gpiolib: Add stubs for gpiod lookup table interface
  2017-05-12  9:38   ` Anatolij Gustschin
@ 2017-05-22  8:54     ` Linus Walleij
  0 siblings, 0 replies; 5+ messages in thread
From: Linus Walleij @ 2017-05-22  8:54 UTC (permalink / raw)
  To: Anatolij Gustschin
  Cc: Alexandre Courbot, Andy Shevchenko, linux-gpio, linux-kernel

On Fri, May 12, 2017 at 11:38 AM, Anatolij Gustschin <agust@denx.de> wrote:
> On Fri, 12 May 2017 11:27:42 +0200
> Linus Walleij linus.walleij@linaro.org wrote:
> ...
>>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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-05-22  8:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-11 18:24 [PATCH v4] gpiolib: Add stubs for gpiod lookup table interface Anatolij Gustschin
2017-05-11 19:02 ` Andy Shevchenko
2017-05-12  9:27 ` Linus Walleij
2017-05-12  9:38   ` Anatolij Gustschin
2017-05-22  8:54     ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).