ASoC: sun8i-codec: Fix build with CONFIG_SND_JACK_INPUT_DEV disabled
authorOndrej Jirman <megi@xff.cz>
Wed, 27 Mar 2024 08:05:34 +0000 (09:05 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 27 Mar 2024 15:57:34 +0000 (15:57 +0000)
commit559aebe45a054a479fdbd2a3dfba999ffd73cc9d
tree75bfd97060b2acc3ef09f80478cf6830b3496434
parentcc983803081aa6a1a5ed9375cb7d01cd5c1da570
ASoC: sun8i-codec: Fix build with CONFIG_SND_JACK_INPUT_DEV disabled

When CONFIG_SND_JACK_INPUT_DEV is disabled, struct snd_jack doesn't
have 'type' field. We can't rely on this field being always present,
so store the jack_type in the codec driver itself.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202403261243.kcXCPAYs-lkp@intel.com/
Link: https://msgid.link/r/20240327080542.3649840-1-megi@xff.cz
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sunxi/sun8i-codec.c