Skip to content

Commit

Permalink
iio: dummy: Fix build error when CONFIG_IIO_TRIGGERED_BUFFER is not set
Browse files Browse the repository at this point in the history
[ Upstream commit 94588c1 ]

Gcc reports build error when CONFIG_IIO_TRIGGERED_BUFFER is not set:

riscv64-linux-gnu-ld: drivers/iio/dummy/iio_simple_dummy_buffer.o: in function `iio_simple_dummy_configure_buffer':
iio_simple_dummy_buffer.c:(.text+0x2b0): undefined reference to `iio_triggered_buffer_setup_ext'
riscv64-linux-gnu-ld: drivers/iio/dummy/iio_simple_dummy_buffer.o: in function `.L0 ':
iio_simple_dummy_buffer.c:(.text+0x2fc): undefined reference to `iio_triggered_buffer_cleanup'

Fix it by select IIO_TRIGGERED_BUFFER for config IIO_SIMPLE_DUMMY_BUFFER.

Fixes: 738f6ba ("iio: dummy: iio_simple_dummy_buffer: use triggered buffer core calls")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Wei Yongjun authored and gregkh committed Jul 14, 2021
1 parent d4ff9e9 commit 5e8a3ef
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/iio/dummy/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ config IIO_SIMPLE_DUMMY_BUFFER
select IIO_BUFFER
select IIO_TRIGGER
select IIO_KFIFO_BUF
select IIO_TRIGGERED_BUFFER
help
Add buffered data capture to the simple dummy driver.

Expand Down

0 comments on commit 5e8a3ef

Please sign in to comment.