ASoC: qcom: cleanup and fix dependency of QCOM_COMMON
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Thu, 24 Nov 2022 14:03:51 +0000 (14:03 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:32:15 +0000 (13:32 +0100)
commit5827a5656d5a6bea313d58ab56b6d1923331e4f5
treefae7f7cd349a00e28dbfc201f806e3002b034fe5
parentb1e4f92dd0c1d3c162d7ca6c1196995565cca96d
ASoC: qcom: cleanup and fix dependency of QCOM_COMMON

[ Upstream commit 8d89cf6ff229ff31cd4f73f5b3928564b81fc41e ]

SND_SOC_QCOM_COMMON depends on SOUNDWIRE for some symbols but this
is not explicitly specified using Kconfig depends. On the other hand
SND_SOC_QCOM_COMMON is also directly selected by the sound card
Kconfigs, this could result in various combinations and some symbols
ending up in modules and soundcard that uses those symbols as in-build
driver.

Fix these issues by explicitly specifying the dependencies of
SND_SOC_QCOM_COMMON and also use imply a to select SND_SOC_QCOM_COMMON
so that the symbol is selected based on its dependencies.

Also remove dummy stubs in common.c around CONFIG_SOUNDWIRE

Fixes: 3bd975f3ae0a ("ASoC: qcom: sm8250: move some code to common")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20221124140351.407506-1-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/qcom/Kconfig
sound/soc/qcom/common.c
sound/soc/qcom/common.h