From 1c2fb40546489ce4ad3cf0cb46d70b5bdea05205 Mon Sep 17 00:00:00 2001 From: YueHaibing Date: Wed, 10 Apr 2019 16:45:58 +0800 Subject: iio: adc: ti-ads7950: Fix build error without CONFIG_GPIOLIB When building with CONFIG_GPIOLIB is not set gcc warns this: drivers/iio/adc/ti-ads7950.c:75:19: error: field chip has incomplete type struct gpio_chip chip; ^~~~ drivers/iio/adc/ti-ads7950.c: In function ti_ads7950_set: drivers/iio/adc/ti-ads7950.c:409:32: error: implicit declaration of function gpiochip_get_data; did you mean acpi_get_data? [-Werror=implicit-function-declaration] struct ti_ads7950_state *st = gpiochip_get_data(chip); ^~~~~~~~~~~~~~~~~ acpi_get_data Reported-by: Hulk Robot Fixes: c97dce792dc8 ("iio: adc: ti-ads7950: add GPIO support") Signed-off-by: YueHaibing Reviewed-by: Justin Chen Reviewed-by: Linus Walleij Signed-off-by: Jonathan Cameron --- drivers/iio/adc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/iio') diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig index d0a3e3b4f6ab..160930889b2e 100644 --- a/drivers/iio/adc/Kconfig +++ b/drivers/iio/adc/Kconfig @@ -968,7 +968,7 @@ config TI_ADS1015 config TI_ADS7950 tristate "Texas Instruments ADS7950 ADC driver" - depends on SPI + depends on SPI && GPIOLIB select IIO_BUFFER select IIO_TRIGGERED_BUFFER help -- cgit v1.2.3