Skip to content

Commit ad46556

Browse files
arndbbroonie
authored andcommitted
ASoC: SDCA: fix HID dependency
It is not possible to enable SND_SOC_SDCA_HID when SND_SOC_SDCA is built-in but HID is in a loadable module, as that results in a link failure: x86_64-linux-ld: sound/soc/sdca/sdca_functions.o: in function `find_sdca_entity_hide': sdca_functions.c:(.text+0x25b): undefined reference to `sdca_add_hid_device' Change SND_SOC_SDCA_HID into a 'bool' option that can only be enabled if this results in a working build, and change the Makefile so this driver is a loadable module if possible. Fixes: ac55801 ("ASoC: SDCA: add a HID device for HIDE entity") Reviewed-by: Charles Keepax <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent f5b92c7 commit ad46556

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

sound/soc/sdca/Kconfig

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ config SND_SOC_SDCA_OPTIONAL
1212
def_tristate SND_SOC_SDCA || !SND_SOC_SDCA
1313

1414
config SND_SOC_SDCA_HID
15-
tristate "SDCA HID support"
16-
depends on SND_SOC_SDCA && HID
15+
bool "SDCA HID support"
16+
depends on SND_SOC_SDCA
17+
depends on HID=y || HID=SND_SOC_SDCA
1718

1819
config SND_SOC_SDCA_IRQ
1920
tristate

sound/soc/sdca/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,7 @@ snd-soc-sdca-hid-y := sdca_hid.o
55
snd-soc-sdca-irq-y := sdca_interrupts.o
66

77
obj-$(CONFIG_SND_SOC_SDCA) += snd-soc-sdca.o
8-
obj-$(CONFIG_SND_SOC_SDCA_HID) += snd-soc-sdca-hid.o
8+
ifdef CONFIG_SND_SOC_SDCA_HID
9+
obj-$(CONFIG_SND_SOC_SDCA) += snd-soc-sdca-hid.o
10+
endif
911
obj-$(CONFIG_SND_SOC_SDCA_IRQ) += snd-soc-sdca-irq.o

0 commit comments

Comments
 (0)