* [PATCH] Staging: iio: adt7316: use correct headers for gpio
@ 2019-06-17 11:09 Arnd Bergmann
2019-06-17 19:13 ` Jonathan Cameron
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2019-06-17 11:09 UTC (permalink / raw)
To: Lars-Peter Clausen, Michael Hennerich, Stefan Popa,
Jonathan Cameron, Greg Kroah-Hartman
Cc: Arnd Bergmann, Shreeya Patel, Jonathan Cameron, Hartmut Knaack,
Peter Meerwald-Stadler, Jeremy Fertic, linux-iio, devel,
linux-kernel
When building without CONFIG_GPIOLIB, we get a compile-time failure:
drivers/staging/iio/addac/adt7316.c:947:3: error: implicit declaration of function 'gpiod_set_value' [-Werror,-Wimplicit-function-declaration]
gpiod_set_value(chip->ldac_pin, 0);
^
drivers/staging/iio/addac/adt7316.c:947:3: note: did you mean 'gpio_set_value'?
include/linux/gpio.h:169:20: note: 'gpio_set_value' declared here
static inline void gpio_set_value(unsigned gpio, int value)
^
drivers/staging/iio/addac/adt7316.c:947:3: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
gpiod_set_value(chip->ldac_pin, 0);
^
drivers/staging/iio/addac/adt7316.c:1805:13: error: implicit declaration of function 'irqd_get_trigger_type' [-Werror,-Wimplicit-function-declaration]
irq_type = irqd_get_trigger_type(irq_get_irq_data(chip->bus.irq));
Include the correct headers that contain the declarations for these
functions.
Fixes: c63460c4298f ("Staging: iio: adt7316: Use device tree data to set ldac_pin")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/staging/iio/addac/adt7316.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/iio/addac/adt7316.c b/drivers/staging/iio/addac/adt7316.c
index 37ce563cb0e1..9cb3d0e42c38 100644
--- a/drivers/staging/iio/addac/adt7316.c
+++ b/drivers/staging/iio/addac/adt7316.c
@@ -6,7 +6,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.20.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Staging: iio: adt7316: use correct headers for gpio
2019-06-17 11:09 [PATCH] Staging: iio: adt7316: use correct headers for gpio Arnd Bergmann
@ 2019-06-17 19:13 ` Jonathan Cameron
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2019-06-17 19:13 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Lars-Peter Clausen, Michael Hennerich, Stefan Popa,
Greg Kroah-Hartman, Shreeya Patel, Jonathan Cameron,
Hartmut Knaack, Peter Meerwald-Stadler, Jeremy Fertic, linux-iio,
devel, linux-kernel
On Mon, 17 Jun 2019 13:09:20 +0200
Arnd Bergmann <arnd@arndb.de> wrote:
> When building without CONFIG_GPIOLIB, we get a compile-time failure:
>
> drivers/staging/iio/addac/adt7316.c:947:3: error: implicit declaration of function 'gpiod_set_value' [-Werror,-Wimplicit-function-declaration]
> gpiod_set_value(chip->ldac_pin, 0);
> ^
> drivers/staging/iio/addac/adt7316.c:947:3: note: did you mean 'gpio_set_value'?
> include/linux/gpio.h:169:20: note: 'gpio_set_value' declared here
> static inline void gpio_set_value(unsigned gpio, int value)
> ^
> drivers/staging/iio/addac/adt7316.c:947:3: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
> gpiod_set_value(chip->ldac_pin, 0);
> ^
> drivers/staging/iio/addac/adt7316.c:1805:13: error: implicit declaration of function 'irqd_get_trigger_type' [-Werror,-Wimplicit-function-declaration]
> irq_type = irqd_get_trigger_type(irq_get_irq_data(chip->bus.irq));
>
> Include the correct headers that contain the declarations for these
> functions.
>
> Fixes: c63460c4298f ("Staging: iio: adt7316: Use device tree data to set ldac_pin")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Sorry, this is me being exceedingly slow on getting the fix upstream.
I've just sent a pull request for the fix I've had queued up for a few weeks.
Jonathan
> ---
> drivers/staging/iio/addac/adt7316.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/staging/iio/addac/adt7316.c b/drivers/staging/iio/addac/adt7316.c
> index 37ce563cb0e1..9cb3d0e42c38 100644
> --- a/drivers/staging/iio/addac/adt7316.c
> +++ b/drivers/staging/iio/addac/adt7316.c
> @@ -6,7 +6,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>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-06-17 19:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-17 11:09 [PATCH] Staging: iio: adt7316: use correct headers for gpio Arnd Bergmann
2019-06-17 19:13 ` Jonathan Cameron
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).