]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ASoC: qcom: sm8250: Fix possibly undefined reference
authorLuca Weiss <luca.weiss@fairphone.com>
Tue, 17 Jun 2025 12:20:12 +0000 (14:20 +0200)
committerMark Brown <broonie@kernel.org>
Sun, 22 Jun 2025 23:26:25 +0000 (00:26 +0100)
With CONFIG_SND_SOC_SM8250=y and CONFIG_SND_SOC_QCOM_OFFLOAD_UTILS=m
selected in kconfig, the build will fail due to trying to link against a
symbol only found in the module.

  aarch64-linux-gnu-ld: sound/soc/qcom/sm8250.o: in function `sm8250_snd_exit':
  sound/soc/qcom/sm8250.c:52:(.text+0x210): undefined reference to `qcom_snd_usb_offload_jack_remove'

Fix this by declaring the dependency that forces CONFIG_SND_SOC_SM8250=m
when CONFIG_SND_SOC_QCOM_OFFLOAD_UTILS is =m.

Reported-by: Matthew Croughan <matthew.croughan@nix.how>
Fixes: 1b8d0d87b934 ("ASoC: qcom: qdsp6: Add headphone jack for offload connection status")
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Link: https://patch.msgid.link/20250617-snd-sm8250-dep-fix-v1-1-879af8906ec4@fairphone.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/qcom/Kconfig

index e86b4a03dd61d2d3ad6a4d9602f69effbaefaa83..3d9ba13ee1e5250c7c4ecce664ff5a62dddf5094 100644 (file)
@@ -186,6 +186,7 @@ config SND_SOC_SM8250
        tristate "SoC Machine driver for SM8250 boards"
        depends on QCOM_APR && SOUNDWIRE
        depends on COMMON_CLK
+       depends on SND_SOC_QCOM_OFFLOAD_UTILS || !SND_SOC_QCOM_OFFLOAD_UTILS
        select SND_SOC_QDSP6
        select SND_SOC_QCOM_COMMON
        select SND_SOC_QCOM_SDW