diff options
| author | Mark Brown <broonie@kernel.org> | 2025-10-21 19:05:28 +0100 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2025-10-21 19:05:28 +0100 |
| commit | e0fb9464295bca2aa92835d02147d3265a83689a (patch) | |
| tree | 31c3329411d927ffac3758633ccacc67f2a4d328 /sound/soc/codecs/cs42l43-jack.c | |
| parent | 8c465b1669bfeaaf0ebd504b96d689e2a2810874 (diff) | |
| parent | d742ebcfe524dc54023f7c520d2ed2e4b7203c19 (diff) | |
ASoC: use snd_kcontrol_chip() instead of
Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:
We would like to hide struct snd_soc_dapm_context from driver. So we need
cleanup code first. Current ASoC have very similar functions (A)(B).
(A) snd_soc_kcontrol_component()
(B) snd_soc_dapm_kcontrol_component()
(B) is using very picky way to get component but using it is necessary in
ASoC. But (A) is just wrapper function to snd_kcontrol_chip(), and directly
using it without wrapper is very common way on ALSA.
This patch-set doesn't merge patches for each vender etc, because it makes
backport difficult.
Diffstat (limited to 'sound/soc/codecs/cs42l43-jack.c')
| -rw-r--r-- | sound/soc/codecs/cs42l43-jack.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/codecs/cs42l43-jack.c b/sound/soc/codecs/cs42l43-jack.c index 68a4ce7c2732..ab6851d9afc7 100644 --- a/sound/soc/codecs/cs42l43-jack.c +++ b/sound/soc/codecs/cs42l43-jack.c @@ -866,7 +866,7 @@ SOC_ENUM_SINGLE_VIRT_DECL(cs42l43_jack_enum, cs42l43_jack_text); int cs42l43_jack_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); struct cs42l43_codec *priv = snd_soc_component_get_drvdata(component); mutex_lock(&priv->jack_lock); @@ -878,7 +878,7 @@ int cs42l43_jack_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *u int cs42l43_jack_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); struct cs42l43_codec *priv = snd_soc_component_get_drvdata(component); struct cs42l43 *cs42l43 = priv->core; struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; |
