aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/intel
diff options
context:
space:
mode:
authorGaosheng Cui <cuigaosheng1@huawei.com>2022-08-22 11:51:33 +0800
committerMark Brown <broonie@kernel.org>2022-09-13 17:12:08 +0100
commit515626a33a194c4caaf2879dbf9e00e882582af0 (patch)
tree0966be0b37eb330d5866b70475a42df9ac7fdc5e /sound/soc/intel
parentASoC: sunxi: sun4i-codec: silence misleading error in probe (diff)
downloadlinux-dev-515626a33a194c4caaf2879dbf9e00e882582af0.tar.xz
linux-dev-515626a33a194c4caaf2879dbf9e00e882582af0.zip
ASoC: Intel: fix unused-variable warning in probe_codec
In configurations with CONFIG_SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC=n, gcc warns about an unused variable: sound/soc/intel/skylake/skl.c: In function ‘probe_codec’: sound/soc/intel/skylake/skl.c:729:18: error: unused variable ‘skl’ [-Werror=unused-variable] struct skl_dev *skl = bus_to_skl(bus); ^~~ cc1: all warnings being treated as errors Fixes: 3fd63658caed9 ("ASoC: Intel: Drop hdac_ext usage for codec device creation") Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com> Acked-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20220822035133.2147381-1-cuigaosheng1@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel')
-rw-r--r--sound/soc/intel/skylake/skl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c
index aeca58246fc7..3997af4eaa89 100644
--- a/sound/soc/intel/skylake/skl.c
+++ b/sound/soc/intel/skylake/skl.c
@@ -697,8 +697,8 @@ static int probe_codec(struct hdac_bus *bus, int addr)
unsigned int cmd = (addr << 28) | (AC_NODE_ROOT << 20) |
(AC_VERB_PARAMETERS << 8) | AC_PAR_VENDOR_ID;
unsigned int res = -1;
- struct skl_dev *skl = bus_to_skl(bus);
#if IS_ENABLED(CONFIG_SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC)
+ struct skl_dev *skl = bus_to_skl(bus);
struct hdac_hda_priv *hda_codec;
int err;
#endif