linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/1]: iio: light: rpr0521: add missing Kconfig dependencies
@ 2022-11-10 14:44 Paul Gazzillo
  2022-11-10 15:42 ` Andy Shevchenko
  2022-11-10 21:47 ` [PATCH v2 " Paul Gazzillo
  0 siblings, 2 replies; 8+ messages in thread
From: Paul Gazzillo @ 2022-11-10 14:44 UTC (permalink / raw)
  To: Jonathan Cameron, Lars-Peter Clausen, Andy Shevchenko,
	Shreeya Patel, Zhigang Shi, Dmitry Osipenko
  Cc: linux-iio, linux-kernel

Steps to reproduce (v6.1-rc2, x86_64):

1. make defconfig menuconfig
2. Enable the driver:
    -> Device Drivers
      -> Industrial I/O support (IIO [=y])
        -> Light sensors
          -> ROHM RPR0521 ALS and proximity sensor driver
3. make drivers/iio/light/rpr0521.o

Causes "implicit declaration of function" errors, e.g.,

    CC      drivers/iio/light/rpr0521.o
  drivers/iio/light/rpr0521.c: In function 'rpr0521_drdy_irq_thread':
  drivers/iio/light/rpr0521.c:434:3: error: implicit declaration of function
           'iio_trigger_poll_chained' [-Werror=implicit-function-declaration]
    434 |   iio_trigger_poll_chained(data->drdy_trigger0);
        |   ^~~~~~~~~~~~~~~~~~~~~~~~

(This bug was found with the help of a tool, krepair, that generates
configuration files for commits: https://github.com/paulgazz/kmax)

The following patch ensures that the code controlled by IIO_BUFFER and
IIO_TRIGGERED_BUFFER is available:

Reported-by: Paul Gazzillo <paul@pgazz.com>
---
 drivers/iio/light/Kconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/iio/light/Kconfig b/drivers/iio/light/Kconfig
index 7cf6e8490123..0d4447df7200 100644
--- a/drivers/iio/light/Kconfig
+++ b/drivers/iio/light/Kconfig
@@ -293,6 +293,8 @@ config RPR0521
 	tristate "ROHM RPR0521 ALS and proximity sensor driver"
 	depends on I2C
 	select REGMAP_I2C
+	select IIO_BUFFER
+	select IIO_TRIGGERED_BUFFER
 	help
 	  Say Y here if you want to build support for ROHM's RPR0521
 	  ambient light and proximity sensor device.
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-11-14 16:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-10 14:44 [PATCH v1 1/1]: iio: light: rpr0521: add missing Kconfig dependencies Paul Gazzillo
2022-11-10 15:42 ` Andy Shevchenko
2022-11-10 20:43   ` Paul Gazzillo
2022-11-10 21:47 ` [PATCH v2 " Paul Gazzillo
2022-11-11 11:25   ` Andy Shevchenko
2022-11-11 15:25     ` Paul Gazzillo
2022-11-12 17:37       ` Jonathan Cameron
2022-11-14 16:22         ` Paul Gazzillo

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).