Skip to contentSkip to conversation

ALSA: hda: cirrus_scodec: Select GPIOLIB for KUnit test

PATCH Applied Richard Fitzgerald 2 participants 2 messages Sep 20, 2023 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: hda: cirrus_scodec: Select GPIOLIB for KUnit test

The KUnit test for cirrus_scodec uses GPIO library functions so select GPIOLIB in Kconfig.

This fixes the ld failures on builds that didn't already select GPIOLIB.
ld: vmlinux.o: in function `cirrus_scodec_test_gpio_get':
sound/pci/hda/cirrus_scodec_test.c:40: undefined reference to
`gpiochip_get_data'
ld: vmlinux.o: in function `cirrus_scodec_test_gpio_probe':
sound/pci/hda/cirrus_scodec_test.c:94: undefined reference to
`gpiochip_generic_request'
ld: sound/pci/hda/cirrus_scodec_test.c:94: undefined reference to
`gpiochip_generic_free'
ld: sound/pci/hda/cirrus_scodec_test.c:95: undefined reference to
`devm_gpiochip_add_data_with_key'

Fixes 2144833e7b41 ("ALSA: hda: cirrus_scodec: Add KUnit test")
---
 sound/pci/hda/Kconfig | 1 +
 1 file changed, 1 insertion(+)
sound/pci/hda/Kconfig +1 -0
index 706cdc589e6f..21a90b3c4cc7 100644
@@ -97,6 +97,7 @@ config SND_HDA_CIRRUS_SCODEC
 config SND_HDA_CIRRUS_SCODEC_KUNIT_TEST
 	tristate "KUnit test for Cirrus side-codec library" if !KUNIT_ALL_TESTS
 	select SND_HDA_CIRRUS_SCODEC
+	select GPIOLIB
 	depends on KUNIT
 	default KUNIT_ALL_TESTS
 	help
Signature · 1 line
2.30.2
Applied
#1 lore raw
Quoted 16 lines · Richard Fitzgerald

The KUnit test for cirrus_scodec uses GPIO library functions so select GPIOLIB in Kconfig.

This fixes the ld failures on builds that didn't already select GPIOLIB.
ld: vmlinux.o: in function `cirrus_scodec_test_gpio_get':
sound/pci/hda/cirrus_scodec_test.c:40: undefined reference to
`gpiochip_get_data'
ld: vmlinux.o: in function `cirrus_scodec_test_gpio_probe':
sound/pci/hda/cirrus_scodec_test.c:94: undefined reference to
`gpiochip_generic_request'
ld: sound/pci/hda/cirrus_scodec_test.c:94: undefined reference to
`gpiochip_generic_free'
ld: sound/pci/hda/cirrus_scodec_test.c:95: undefined reference to
`devm_gpiochip_add_data_with_key'

Quoted 4 lines
Fixes 2144833e7b41 ("ALSA: hda: cirrus_scodec: Add KUnit test")

Thanks, applied now.

Takashi