[PATCH] ASoC: amd: acp: Use IS_REACHABLE() for SND_SOC_ACPI_AMD_SDCA_QUIRKS guard
Syed Saba Kareem <[email protected]>
| Newsgroups | org.alsa-project.alsa-devel,org.kernel.vger.linux-kernel,org.kernel.vger.linux-sound |
|---|---|
| Message-ID | <[email protected]> |
From: Syed Saba Kareem <[email protected]> Fix a build failure when CONFIG_SND_SOC_ACPI_AMD_MATCH=y (built-in) and CONFIG_SND_SOC_ACPI_AMD_SDCA_QUIRKS=m (module): x86_64-linux-ld: sound/soc/amd/acp/amd-acp70-acpi-match.o:(.data+0xf00): undefined reference to `snd_soc_acpi_amd_sdca_is_device_rt712_vb' The header guard uses IS_ENABLED() which evaluates to true for both =y and =m configs. This causes the real function declaration to be used even when the symbol is only available in a loadable module, resulting in an undefined reference when the caller is built-in. Replace IS_ENABLED() with IS_REACHABLE() which correctly evaluates to false when the dependency is a module but the caller is built-in, causing the static inline stub to be used instead. Fixes: 10d366a846be ("ASoC: amd: acp: Fix Kconfig dependencies for SND_SOC_ACPI_AMD_SDCA_QUIRKS") Signed-off-by: Syed Saba Kareem <[email protected]> --- sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.h b/sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.h index 0e644e71e76f..66df37d29d84 100644 --- a/sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.h +++ b/sound/soc/amd/acp/soc-acpi-amd-sdca-quirks.h @@ -9,7 +9,7 @@ #ifndef _SND_SOC_ACPI_AMD_SDCA_QUIRKS #define _SND_SOC_ACPI_AMD_SDCA_QUIRKS -#if IS_ENABLED(CONFIG_SND_SOC_ACPI_AMD_SDCA_QUIRKS) +#if IS_REACHABLE(CONFIG_SND_SOC_ACPI_AMD_SDCA_QUIRKS) bool snd_soc_acpi_amd_sdca_is_device_rt712_vb(void *arg); -- 2.43.0