* [PATCH] iio: adc: ti-ads7950: Fix build error without CONFIG_GPIOLIB
@ 2019-04-10 8:45 Yue Haibing
2019-04-10 19:56 ` Justin Chen
2019-04-11 13:43 ` Linus Walleij
0 siblings, 2 replies; 3+ messages in thread
From: Yue Haibing @ 2019-04-10 8:45 UTC (permalink / raw)
To: jic23, knaack.h, lars, pmeerw, stefan.popa, broonie, justinpopo6,
linus.walleij, Jonathan.Cameron
Cc: linux-kernel, linux-iio, YueHaibing
From: YueHaibing <yuehaibing@huawei.com>
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 <hulkci@huawei.com>
Fixes: c97dce792dc8 ("iio: adc: ti-ads7950: add GPIO support")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/iio/adc/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig
index 846c7ac..f760269 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
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] iio: adc: ti-ads7950: Fix build error without CONFIG_GPIOLIB
2019-04-10 8:45 [PATCH] iio: adc: ti-ads7950: Fix build error without CONFIG_GPIOLIB Yue Haibing
@ 2019-04-10 19:56 ` Justin Chen
2019-04-11 13:43 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Justin Chen @ 2019-04-10 19:56 UTC (permalink / raw)
To: Yue Haibing
Cc: Jonathan Cameron, knaack.h, lars, Peter Meerwald-Stadler,
stefan.popa, Mark Brown, Linus Walleij, Jonathan.Cameron,
linux-kernel, linux-iio
On Wed, Apr 10, 2019 at 1:47 AM Yue Haibing <yuehaibing@huawei.com> wrote:
>
> From: YueHaibing <yuehaibing@huawei.com>
>
> 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 <hulkci@huawei.com>
> Fixes: c97dce792dc8 ("iio: adc: ti-ads7950: add GPIO support")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Justin Chen <justinpopo6@gmail.com>
Thanks,
Justin
> ---
> drivers/iio/adc/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig
> index 846c7ac..f760269 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
> --
> 2.7.4
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] iio: adc: ti-ads7950: Fix build error without CONFIG_GPIOLIB
2019-04-10 8:45 [PATCH] iio: adc: ti-ads7950: Fix build error without CONFIG_GPIOLIB Yue Haibing
2019-04-10 19:56 ` Justin Chen
@ 2019-04-11 13:43 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2019-04-11 13:43 UTC (permalink / raw)
To: Yue Haibing
Cc: Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
Peter Meerwald, Stefan Popa, Mark Brown, Justin Chen,
Jonathan Cameron, linux-kernel, linux-iio
On Wed, Apr 10, 2019 at 10:47 AM Yue Haibing <yuehaibing@huawei.com> wrote:
> From: YueHaibing <yuehaibing@huawei.com>
>
> 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 <hulkci@huawei.com>
> Fixes: c97dce792dc8 ("iio: adc: ti-ads7950: add GPIO support")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-04-11 13:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-10 8:45 [PATCH] iio: adc: ti-ads7950: Fix build error without CONFIG_GPIOLIB Yue Haibing
2019-04-10 19:56 ` Justin Chen
2019-04-11 13:43 ` Linus Walleij
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.