Re: [PATCH v2] staging: iio: adt7316: Fix build errors when GPIOLIB is not set

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 5 Jun 2019 20:24:09 -0700
Randy Dunlap <rdunlap@xxxxxxxxxxxxx> wrote:

> On 6/5/19 7:05 PM, 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.
> > 
> > While at it, remove <linux/gpio.h> as this driver is a GPIO
> > consumer and not a GPIO driver.
> > 
> > Reported-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
> > Signed-off-by: Fabio Estevam <festevam@xxxxxxxxx>  
> 
> Acked-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx> # build-tested
Applied to the fixes-togreg branch of iio.git.

thanks,

Jonathan

> 
> Thanks.
> 
> > ---
> > Changes since v1:
> > - Remove <linux/gpio.h> - Phil
> > 
> >  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>
> >   
> 
> 

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux