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

ASoC: codecs: msm8916-wcd-digital: 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/87qzv6qfhl.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Kuninori Morimoto and committed by
Mark Brown
3c9e6dcc be9342c5

+2 -4
+2 -4
sound/soc/codecs/msm8916-wcd-digital.c
··· 423 423 struct snd_ctl_elem_value *ucontrol) 424 424 { 425 425 426 - struct snd_soc_component *component = 427 - snd_soc_kcontrol_component(kcontrol); 426 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 428 427 struct wcd_iir_filter_ctl *ctl = 429 428 (struct wcd_iir_filter_ctl *)kcontrol->private_value; 430 429 struct soc_bytes_ext *params = &ctl->bytes_ext; ··· 468 469 struct snd_kcontrol *kcontrol, 469 470 struct snd_ctl_elem_value *ucontrol) 470 471 { 471 - struct snd_soc_component *component = 472 - snd_soc_kcontrol_component(kcontrol); 472 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 473 473 struct wcd_iir_filter_ctl *ctl = 474 474 (struct wcd_iir_filter_ctl *)kcontrol->private_value; 475 475 struct soc_bytes_ext *params = &ctl->bytes_ext;