Skip to content

Commit 7a2f6f6

Browse files
liambeguinjic23
authored andcommitted
iio: test: fix missing MODULE_LICENSE for IIO_RESCALE=m
When IIO_RESCALE_KUNIT_TEST=y and IIO_RESCALE=m, drivers/iio/afe/iio-rescale.o is built twice causing the MODULE_LICENSE() to be lost, as shown by: ERROR: modpost: missing MODULE_LICENSE() in drivers/iio/afe/iio-rescale.o Rework the build configuration to have the dependency specified in the Kconfig. Reported-by: Randy Dunlap <[email protected]> Fixes: 8e74a48 ("iio: test: add basic tests for the iio-rescale driver") Signed-off-by: Liam Beguin <[email protected]> Acked-by: Randy Dunlap <[email protected]> Tested-by: Randy Dunlap <[email protected]> Reviewed-by: Masahiro Yamada <[email protected]> Link: https://lore.kernel.org/r/[email protected] Cc: <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
1 parent 10b9c2c commit 7a2f6f6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/iio/test/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Keep in alphabetical order
77
config IIO_RESCALE_KUNIT_TEST
88
bool "Test IIO rescale conversion functions"
9-
depends on KUNIT=y && !IIO_RESCALE
9+
depends on KUNIT=y && IIO_RESCALE=y
1010
default KUNIT_ALL_TESTS
1111
help
1212
If you want to run tests on the iio-rescale code say Y here.

drivers/iio/test/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
#
55

66
# Keep in alphabetical order
7-
obj-$(CONFIG_IIO_RESCALE_KUNIT_TEST) += iio-test-rescale.o ../afe/iio-rescale.o
7+
obj-$(CONFIG_IIO_RESCALE_KUNIT_TEST) += iio-test-rescale.o
88
obj-$(CONFIG_IIO_TEST_FORMAT) += iio-test-format.o
99
CFLAGS_iio-test-format.o += $(DISABLE_STRUCTLEAK_PLUGIN)

0 commit comments

Comments
 (0)