• Fabio Estevam's avatar
    staging: iio: adt7316: Fix build errors when GPIOLIB is not set · 767e52f0
    Fabio Estevam authored
    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: default avatarRandy Dunlap <rdunlap@infradead.org>
    Signed-off-by: default avatarFabio Estevam <festevam@gmail.com>
    Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
    Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
    767e52f0
adt7316.c 57.2 KB