All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: iio: adt7316: Fix build errors when GPIOLIB is not set
@ 2019-06-06  1:42 Fabio Estevam
  2019-06-06  1:59 ` Phil Reid
  0 siblings, 1 reply; 3+ messages in thread
From: Fabio Estevam @ 2019-06-06  1:42 UTC (permalink / raw)
  To: jic23
  Cc: lars, Michael.Hennerich, rdunlap, linux-iio, gregkh, devel,
	Fabio Estevam

On x86_64 when GPIOLIB is not set the following build errors
are seen:

drivers/staging/iio/addac/adt7316.c:947:3: error: implicit declaration of function 'gpiod_set_value' [-Werror=implicit-function-declaration]
drivers/staging/iio/addac/adt7316.c:1805:2: error: implicit declaration of function 'irqd_get_trigger_type' [-Werror=implicit-function-declaration]

These functions are provided by the <linux/gpio/consumer.h>
and <linux/irq.h> headers, so include them to fix these
build errors.

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
 drivers/staging/iio/addac/adt7316.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/staging/iio/addac/adt7316.c b/drivers/staging/iio/addac/adt7316.c
index 37ce563cb0e1..5470a9c3f872 100644
--- a/drivers/staging/iio/addac/adt7316.c
+++ b/drivers/staging/iio/addac/adt7316.c
@@ -7,6 +7,8 @@
 
 #include <linux/interrupt.h>
 #include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
+#include <linux/irq.h>
 #include <linux/workqueue.h>
 #include <linux/device.h>
 #include <linux/kernel.h>
-- 
2.17.1


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

* Re: [PATCH] staging: iio: adt7316: Fix build errors when GPIOLIB is not set
  2019-06-06  1:42 [PATCH] staging: iio: adt7316: Fix build errors when GPIOLIB is not set Fabio Estevam
@ 2019-06-06  1:59 ` Phil Reid
  2019-06-06  2:06   ` Fabio Estevam
  0 siblings, 1 reply; 3+ messages in thread
From: Phil Reid @ 2019-06-06  1:59 UTC (permalink / raw)
  To: Fabio Estevam, jic23
  Cc: lars, Michael.Hennerich, rdunlap, linux-iio, gregkh, devel

G'day Fabio,

On 6/06/2019 09:42, Fabio Estevam wrote:
> On x86_64 when GPIOLIB is not set the following build errors
> are seen:
> 
> drivers/staging/iio/addac/adt7316.c:947:3: error: implicit declaration of function 'gpiod_set_value' [-Werror=implicit-function-declaration]
> drivers/staging/iio/addac/adt7316.c:1805:2: error: implicit declaration of function 'irqd_get_trigger_type' [-Werror=implicit-function-declaration]
> 
> These functions are provided by the <linux/gpio/consumer.h>
> and <linux/irq.h> headers, so include them to fix these
> build errors.
> 
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> ---
>   drivers/staging/iio/addac/adt7316.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/staging/iio/addac/adt7316.c b/drivers/staging/iio/addac/adt7316.c
> index 37ce563cb0e1..5470a9c3f872 100644
> --- a/drivers/staging/iio/addac/adt7316.c
> +++ b/drivers/staging/iio/addac/adt7316.c
> @@ -7,6 +7,8 @@
>   
>   #include <linux/interrupt.h>
>   #include <linux/gpio.h>
This should be removed as well.
See comment at top of linux/gpio.h



> +#include <linux/gpio/consumer.h>
> +#include <linux/irq.h>
>   #include <linux/workqueue.h>
>   #include <linux/device.h>
>   #include <linux/kernel.h>
> 


-- 
Regards
Phil Reid

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

* Re: [PATCH] staging: iio: adt7316: Fix build errors when GPIOLIB is not set
  2019-06-06  1:59 ` Phil Reid
@ 2019-06-06  2:06   ` Fabio Estevam
  0 siblings, 0 replies; 3+ messages in thread
From: Fabio Estevam @ 2019-06-06  2:06 UTC (permalink / raw)
  To: Phil Reid
  Cc: Jonathan Cameron, Lars-Peter Clausen, Michael Hennerich,
	Randy Dunlap, linux-iio, Greg Kroah-Hartman,
	open list:STAGING SUBSYSTEM

Hi Phil,

On Wed, Jun 5, 2019 at 10:59 PM Phil Reid <preid@electromag.com.au> wrote:

> >   #include <linux/gpio.h>
> This should be removed as well.
> See comment at top of linux/gpio.h

Good catch! Just sent a v2.

Thanks

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

end of thread, other threads:[~2019-06-06  2:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-06  1:42 [PATCH] staging: iio: adt7316: Fix build errors when GPIOLIB is not set Fabio Estevam
2019-06-06  1:59 ` Phil Reid
2019-06-06  2:06   ` Fabio Estevam

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.