Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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'

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202309201646.NnjfKPWk-lkp@intel.com/
Fixes: 2144833e7b41 ("ALSA: hda: cirrus_scodec: Add KUnit test")
Link: https://lore.kernel.org/r/20230920090338.29345-1-rf@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by

Richard Fitzgerald and committed by
Takashi Iwai
f9262fb1 2144833e

+1
+1
sound/pci/hda/Kconfig
··· 97 97 config SND_HDA_CIRRUS_SCODEC_KUNIT_TEST 98 98 tristate "KUnit test for Cirrus side-codec library" if !KUNIT_ALL_TESTS 99 99 select SND_HDA_CIRRUS_SCODEC 100 + select GPIOLIB 100 101 depends on KUNIT 101 102 default KUNIT_ALL_TESTS 102 103 help