diff options
| author | Kuninori Morimoto | 2025-10-14 04:21:09 +0000 |
|---|---|---|
| committer | Mark Brown | 2025-10-20 02:42:40 +0100 |
| commit | 211367ef1d4031a29fa8e07f430155d68802e8ec (patch) | |
| tree | 31b214e8b877e644cfdbbf33212a7883c930c697 | |
| parent | 8f1d72f84e85a8757a0981040654be1fd18ea6e3 (diff) | |
ASoC: codecs: cs43130: use snd_kcontrol_chip() instead of snd_soc_kcontrol_component()
We have very similar name functions (A)(B). Both gets component from
snd_kcontrol, but (A) is used in callback functions which is registered
through snd_soc_add_component_controls(), (B) is used through
snd_soc_dapm_new_widgets().
(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.
To reduce confusions of similar function, let's use common way on (A).
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87sefmru4r.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
| -rw-r--r-- | sound/soc/codecs/cs43130.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/codecs/cs43130.c b/sound/soc/codecs/cs43130.c index d9b3d73c8388..a3bdaac9c059 100644 --- a/sound/soc/codecs/cs43130.c +++ b/sound/soc/codecs/cs43130.c @@ -1062,7 +1062,7 @@ static int cs43130_pcm_ch_put(struct snd_kcontrol *kcontrol, { struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; unsigned int *item = ucontrol->value.enumerated.item; - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); struct cs43130_private *cs43130 = snd_soc_component_get_drvdata(component); unsigned int val; |
