Skip to contentSkip to conversation

staging: iio: Fix up the module build.

PATCH In review Paul Mundt 3 participants 3 messages Nov 5, 2009

Subsystems (4)
lore
Share & tools
lore

Paul Mundt

author
#0 lore raw

PATCH 1/1 staging: iio: Fix up the module build.

Both the max1363 and lis3l02dq modules rely on IIO trigger support in their ring buffer implementations, which is presently a separate config option. In the case of IIO_RING_BUFFER=y and IIO_TRIGGER=n, we end up with the following:

ERROR: "iio_trigger_attach_poll_func" [drivers/staging/iio/adc/max1363.ko] undefined!
ERROR: "iio_trigger_dettach_poll_func" [drivers/staging/iio/adc/max1363.ko] undefined!
ERROR: "iio_trigger_unregister" [drivers/staging/iio/accel/lis3l02dq.ko] undefined!
ERROR: "iio_trigger_notify_done" [drivers/staging/iio/accel/lis3l02dq.ko] undefined!
ERROR: "iio_trigger_read_name" [drivers/staging/iio/accel/lis3l02dq.ko] undefined!
ERROR: "iio_trigger_poll" [drivers/staging/iio/accel/lis3l02dq.ko] undefined!
ERROR: "iio_trigger_attach_poll_func" [drivers/staging/iio/accel/lis3l02dq.ko] undefined!
ERROR: "iio_trigger_register" [drivers/staging/iio/accel/lis3l02dq.ko] undefined!
ERROR: "iio_free_trigger" [drivers/staging/iio/accel/lis3l02dq.ko] undefined!
ERROR: "iio_trigger_dettach_poll_func" [drivers/staging/iio/accel/lis3l02dq.ko] undefined!
ERROR: "iio_allocate_trigger" [drivers/staging/iio/accel/lis3l02dq.ko] undefined! make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2

This adds an IIO_TRIGGER select for these two drivers conditional on IIO ring buffer support. Caught with an SH randconfig in -next.

---

 drivers/staging/iio/accel/Kconfig |    1 +
 drivers/staging/iio/adc/Kconfig   |    1 +
 2 files changed, 2 insertions(+)
drivers/staging/iio/accel/Kconfig +1 -0
index fef3da4..c245644 100644
@@ -13,6 +13,7 @@ config KXSD9
 config LIS3L02DQ
 	tristate "ST Microelectronics LIS3L02DQ Accelerometer Driver"
 	depends on SPI
+	select IIO_TRIGGER if IIO_RING_BUFFER
 	help
 	  Say yes here to build SPI support for the ST microelectronics
 	  accelerometer. The driver supplies direct access via sysfs files
drivers/staging/iio/adc/Kconfig +1 -0
index b8c2858..a2f1626 100644
@@ -6,6 +6,7 @@ comment "Analog to digital convertors"
 config MAX1363
 	tristate "MAXIM max1363 ADC driver"
 	depends on I2C
+	select IIO_TRIGGER if IIO_RING_BUFFER
 	help
 	  Say yes here to build support for many MAXIM i2c analog to digital
 	  convertors (ADC). (max1361, max1362, max1363, max1364, max1136,
Acked-by on v1 1/1
#1 lore raw

Good catch.

Thanks

Quoted 54 lines

Both the max1363 and lis3l02dq modules rely on IIO trigger support in their ring buffer implementations, which is presently a separate config option. In the case of IIO_RING_BUFFER=y and IIO_TRIGGER=n, we end up with the following:

ERROR: "iio_trigger_attach_poll_func" [drivers/staging/iio/adc/max1363.ko] undefined!
ERROR: "iio_trigger_dettach_poll_func" [drivers/staging/iio/adc/max1363.ko] undefined!
ERROR: "iio_trigger_unregister" [drivers/staging/iio/accel/lis3l02dq.ko] undefined!
ERROR: "iio_trigger_notify_done" [drivers/staging/iio/accel/lis3l02dq.ko] undefined!
ERROR: "iio_trigger_read_name" [drivers/staging/iio/accel/lis3l02dq.ko] undefined!
ERROR: "iio_trigger_poll" [drivers/staging/iio/accel/lis3l02dq.ko] undefined!
ERROR: "iio_trigger_attach_poll_func" [drivers/staging/iio/accel/lis3l02dq.ko] undefined!
ERROR: "iio_trigger_register" [drivers/staging/iio/accel/lis3l02dq.ko] undefined!
ERROR: "iio_free_trigger" [drivers/staging/iio/accel/lis3l02dq.ko] undefined!
ERROR: "iio_trigger_dettach_poll_func" [drivers/staging/iio/accel/lis3l02dq.ko] undefined!
ERROR: "iio_allocate_trigger" [drivers/staging/iio/accel/lis3l02dq.ko] undefined! make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2

This adds an IIO_TRIGGER select for these two drivers conditional on IIO ring buffer support. Caught with an SH randconfig in -next.

---

 drivers/staging/iio/accel/Kconfig |    1 +
 drivers/staging/iio/adc/Kconfig   |    1 +
 2 files changed, 2 insertions(+)
drivers/staging/iio/accel/Kconfig +1 -0
index fef3da4..c245644 100644
@@ -13,6 +13,7 @@ config KXSD9
 config LIS3L02DQ
 	tristate "ST Microelectronics LIS3L02DQ Accelerometer Driver"
 	depends on SPI
+	select IIO_TRIGGER if IIO_RING_BUFFER
 	help
 	  Say yes here to build SPI support for the ST microelectronics
 	  accelerometer. The driver supplies direct access via sysfs files
drivers/staging/iio/adc/Kconfig +1 -0
index b8c2858..a2f1626 100644
@@ -6,6 +6,7 @@ comment "Analog to digital convertors"
 config MAX1363
 	tristate "MAXIM max1363 ADC driver"
 	depends on I2C
+	select IIO_TRIGGER if IIO_RING_BUFFER
 	help
 	  Say yes here to build support for many MAXIM i2c analog to digital
 	  convertors (ADC). (max1361, max1362, max1363, max1364, max1136,
#2 lore raw
Quoted 5 lines · On Thu, 05 Nov 2009 11:06:31 +0000 Jonathan Cameron wrote:

Good catch.

Thanks

With this patch applied, I still see these problems (linux-next-20091105) with a randconfig:

drivers/staging/iio/adc/max1363_ring.c: In function 'max1363_poll_bh_to_ring':
drivers/staging/iio/adc/max1363_ring.c:142: error: implicit declaration of function 'iio_to_sw_ring' drivers/staging/iio/adc/max1363_ring.c:142: warning: initialization makes pointer from integer without a cast drivers/staging/iio/adc/max1363_ring.c:178: error: dereferencing pointer to incomplete type drivers/staging/iio/adc/max1363_ring.c: In function 'max1363_register_ring_funcs_and_init':
drivers/staging/iio/adc/max1363_ring.c:190: error: implicit declaration of function 'iio_sw_rb_allocate' drivers/staging/iio/adc/max1363_ring.c:190: warning: assignment makes pointer from integer without a cast drivers/staging/iio/adc/max1363_ring.c:216: error: implicit declaration of function 'iio_sw_rb_free' make[5]: *** [drivers/staging/iio/adc/max1363_ring.o] Error 1

config is attached.

Quoted 46 lines
Quoted 46 lines

Both the max1363 and lis3l02dq modules rely on IIO trigger support in their ring buffer implementations, which is presently a separate config option. In the case of IIO_RING_BUFFER=y and IIO_TRIGGER=n, we end up with the following:

ERROR: "iio_trigger_attach_poll_func" [drivers/staging/iio/adc/max1363.ko] undefined!
ERROR: "iio_trigger_dettach_poll_func" [drivers/staging/iio/adc/max1363.ko] undefined!
ERROR: "iio_trigger_unregister" [drivers/staging/iio/accel/lis3l02dq.ko] undefined!
ERROR: "iio_trigger_notify_done" [drivers/staging/iio/accel/lis3l02dq.ko] undefined!
ERROR: "iio_trigger_read_name" [drivers/staging/iio/accel/lis3l02dq.ko] undefined!
ERROR: "iio_trigger_poll" [drivers/staging/iio/accel/lis3l02dq.ko] undefined!
ERROR: "iio_trigger_attach_poll_func" [drivers/staging/iio/accel/lis3l02dq.ko] undefined!
ERROR: "iio_trigger_register" [drivers/staging/iio/accel/lis3l02dq.ko] undefined!
ERROR: "iio_free_trigger" [drivers/staging/iio/accel/lis3l02dq.ko] undefined!
ERROR: "iio_trigger_dettach_poll_func" [drivers/staging/iio/accel/lis3l02dq.ko] undefined!
ERROR: "iio_allocate_trigger" [drivers/staging/iio/accel/lis3l02dq.ko] undefined! make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2

This adds an IIO_TRIGGER select for these two drivers conditional on IIO ring buffer support. Caught with an SH randconfig in -next.

---

 drivers/staging/iio/accel/Kconfig |    1 +
 drivers/staging/iio/adc/Kconfig   |    1 +
 2 files changed, 2 insertions(+)
drivers/staging/iio/accel/Kconfig +1 -0
index fef3da4..c245644 100644
@@ -13,6 +13,7 @@ config KXSD9
 config LIS3L02DQ
 	tristate "ST Microelectronics LIS3L02DQ Accelerometer Driver"
 	depends on SPI
+	select IIO_TRIGGER if IIO_RING_BUFFER
 	help
 	  Say yes here to build SPI support for the ST microelectronics
 	  accelerometer. The driver supplies direct access via sysfs files
drivers/staging/iio/adc/Kconfig +0 -0
index b8c2858..a2f1626 100644
Quoted 8 lines

drivers/staging/iio/adc/Kconfig comment "Analog to digital convertors" · line 12

Quoted 8 lines
drivers/staging/iio/adc/Kconfig +1 -0
@@ -6,6 +6,7 @@ comment "Analog to digital convertors"
 config MAX1363
 	tristate "MAXIM max1363 ADC driver"
 	depends on I2C
+	select IIO_TRIGGER if IIO_RING_BUFFER
 	help
 	  Say yes here to build support for many MAXIM i2c analog to digital
 	  convertors (ADC). (max1361, max1362, max1363, max1364, max1136,

---
~Randy