Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: dapm: Fix changes to DECLARE_ADAU17X1_DSP_MUX_CTRL

The changes to DECLARE_ADAU17X1_DSP_MUX_CTRL did avoid the issue with a
compiler not liking all the macro indirection. However it introduced a
new issue with respect to the mux not being declared static:

sound/soc/codecs/adau17x1.c:275:8: sparse: sparse: symbol
'adau17x1_dac_mux' was not declared. Should it be static?
sound/soc/codecs/adau17x1.c:278:8: sparse: sparse: symbol
'adau17x1_capture_mux' was not declared. Should it be static?

Fix this up by going back to the inline declaration of the soc_enum, but
just call SOC_ENUM_EXT directly rather than indirecting through
SOC_DAPM_ENUM_EXT.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202503061119.4QGlnOi6-lkp@intel.com/
Fixes: c951b20766f0 ("ASoC: dapm: Use ASoC control macros where possible")
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20250306104233.1638625-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Charles Keepax and committed by
Mark Brown
269b8442 c6141ba0

+4 -6
+4 -6
sound/soc/codecs/adau17x1.c
··· 254 254 } 255 255 256 256 #define DECLARE_ADAU17X1_DSP_MUX_CTRL(_name, _label, _stream, _text) \ 257 - const struct soc_enum _name##_enum = \ 258 - SOC_ENUM_SINGLE(SND_SOC_NOPM, _stream, \ 259 - ARRAY_SIZE(_text), _text); \ 260 257 const struct snd_kcontrol_new _name = \ 261 - SOC_DAPM_ENUM_EXT(_label, _name##_enum, \ 262 - adau17x1_dsp_mux_enum_get, \ 263 - adau17x1_dsp_mux_enum_put) 258 + SOC_ENUM_EXT(_label, (const struct soc_enum)\ 259 + SOC_ENUM_SINGLE(SND_SOC_NOPM, _stream, \ 260 + ARRAY_SIZE(_text), _text), \ 261 + adau17x1_dsp_mux_enum_get, adau17x1_dsp_mux_enum_put) 264 262 265 263 static const char * const adau17x1_dac_mux_text[] = { 266 264 "DSP",