* [PATCH] iio: humidity: am2315: Select IIO_TRIGGERED_BUFFER to prevent build errors
@ 2016-08-18 14:05 Mika Westerberg
2016-08-21 18:36 ` Jonathan Cameron
0 siblings, 1 reply; 2+ messages in thread
From: Mika Westerberg @ 2016-08-18 14:05 UTC (permalink / raw)
To: linux-iio
Cc: Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
Peter Meerwald-Stadler, Tiberiu Breana, Mika Westerberg
Commit 0d96d5ead3f7 ("iio: humidity: Add triggered buffer support for
AM2315") added support for triggered buffers but those are only available
when IIO_TRIGGERED_BUFFER is selected. Currently we get warnings like:
drivers/iio/humidity/am2315.c: In function ‘am2315_trigger_handler’:
drivers/iio/humidity/am2315.c:186:2: error: implicit declaration of function
‘iio_push_to_buffers_with_timestamp’ [-Werror=implicit-function-declaration]
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
scripts/Makefile.build:289: recipe for target 'drivers/iio/humidity/am2315.o' failed
Furthermore linking the kernel executable fails because triggered buffer
functions are never build.
Fix this by selecting IIO_TRIGGERED_BUFFER and IIO_BUFFER when the driver is
enabled.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
---
drivers/iio/humidity/Kconfig | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/iio/humidity/Kconfig b/drivers/iio/humidity/Kconfig
index 738a86d9e4a9..d04124345992 100644
--- a/drivers/iio/humidity/Kconfig
+++ b/drivers/iio/humidity/Kconfig
@@ -6,6 +6,8 @@ menu "Humidity sensors"
config AM2315
tristate "Aosong AM2315 relative humidity and temperature sensor"
depends on I2C
+ select IIO_BUFFER
+ select IIO_TRIGGERED_BUFFER
help
If you say yes here you get support for the Aosong AM2315
relative humidity and ambient temperature sensor.
--
2.8.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] iio: humidity: am2315: Select IIO_TRIGGERED_BUFFER to prevent build errors
2016-08-18 14:05 [PATCH] iio: humidity: am2315: Select IIO_TRIGGERED_BUFFER to prevent build errors Mika Westerberg
@ 2016-08-21 18:36 ` Jonathan Cameron
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2016-08-21 18:36 UTC (permalink / raw)
To: Mika Westerberg, linux-iio
Cc: Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald-Stadler,
Tiberiu Breana
On 18/08/16 15:05, Mika Westerberg wrote:
> Commit 0d96d5ead3f7 ("iio: humidity: Add triggered buffer support for
> AM2315") added support for triggered buffers but those are only available
> when IIO_TRIGGERED_BUFFER is selected. Currently we get warnings like:
>
> drivers/iio/humidity/am2315.c: In function ‘am2315_trigger_handler’:
> drivers/iio/humidity/am2315.c:186:2: error: implicit declaration of function
> ‘iio_push_to_buffers_with_timestamp’ [-Werror=implicit-function-declaration]
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> cc1: some warnings being treated as errors
> scripts/Makefile.build:289: recipe for target 'drivers/iio/humidity/am2315.o' failed
>
> Furthermore linking the kernel executable fails because triggered buffer
> functions are never build.
>
> Fix this by selecting IIO_TRIGGERED_BUFFER and IIO_BUFFER when the driver is
> enabled.
>
> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Hi Mika,
I already have a patch queued up for this bug. Just been on holiday so
running a bit behind with getting things upstream. Should go in the
next few days.
Jonathan
> ---
> drivers/iio/humidity/Kconfig | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/iio/humidity/Kconfig b/drivers/iio/humidity/Kconfig
> index 738a86d9e4a9..d04124345992 100644
> --- a/drivers/iio/humidity/Kconfig
> +++ b/drivers/iio/humidity/Kconfig
> @@ -6,6 +6,8 @@ menu "Humidity sensors"
> config AM2315
> tristate "Aosong AM2315 relative humidity and temperature sensor"
> depends on I2C
> + select IIO_BUFFER
> + select IIO_TRIGGERED_BUFFER
> help
> If you say yes here you get support for the Aosong AM2315
> relative humidity and ambient temperature sensor.
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-08-21 18:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-18 14:05 [PATCH] iio: humidity: am2315: Select IIO_TRIGGERED_BUFFER to prevent build errors Mika Westerberg
2016-08-21 18:36 ` 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).