From: Kuninori Morimoto Date: Tue, 11 Nov 2025 00:18:10 +0000 (+0000) Subject: ASoC: atmel: tse850-pcm5142: convert to snd_soc_dapm_xxx() X-Git-Tag: v6.19-rc1~156^2~3^2~43^2~279 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d2188983a12e036531ecc67d89c6e1388855ea1;p=thirdparty%2Fkernel%2Flinux.git ASoC: atmel: tse850-pcm5142: convert to snd_soc_dapm_xxx() This patch converts below functions. dapm->dev -> snd_soc_dapm_to_dev() dapm->card -> snd_soc_dapm_to_card() dapm->component -> snd_soc_dapm_to_component() dapm_kcontrol_get_value() -> snd_soc_dapm_kcontrol_get_value() snd_soc_component_enable_pin() -> snd_soc_dapm_enable_pin() snd_soc_component_enable_pin_unlocked() -> snd_soc_dapm_enable_pin_unlocked() snd_soc_component_disable_pin() -> snd_soc_dapm_disable_pin() snd_soc_component_disable_pin_unlocked() -> snd_soc_dapm_disable_pin_unlocked() snd_soc_component_nc_pin() -> snd_soc_dapm_nc_pin() snd_soc_component_nc_pin_unlocked() -> snd_soc_dapm_nc_pin_unlocked() snd_soc_component_get_pin_status() -> snd_soc_dapm_get_pin_status() snd_soc_component_force_enable_pin() -> snd_soc_dapm_force_enable_pin() snd_soc_component_force_enable_pin_unlocked() -> snd_soc_dapm_force_enable_pin_unlocked() snd_soc_component_force_bias_level() -> snd_soc_dapm_force_bias_level() snd_soc_component_get_bias_level() -> snd_soc_dapm_get_bias_level() snd_soc_component_init_bias_level() -> snd_soc_dapm_init_bias_level() snd_soc_component_get_dapm() -> snd_soc_component_to_dapm() snd_soc_dapm_kcontrol_component() -> snd_soc_dapm_kcontrol_to_component() snd_soc_dapm_kcontrol_widget() -> snd_soc_dapm_kcontrol_to_widget() snd_soc_dapm_kcontrol_dapm() -> snd_soc_dapm_kcontrol_to_dapm() snd_soc_dapm_np_pin() -> snd_soc_dapm_disable_pin() Signed-off-by: Kuninori Morimoto Reviewed-by: Charles Keepax Link: https://patch.msgid.link/87v7jh8lrx.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/atmel/tse850-pcm5142.c b/sound/soc/atmel/tse850-pcm5142.c index 2a1d0408a4cf1..0b4927d07f25c 100644 --- a/sound/soc/atmel/tse850-pcm5142.c +++ b/sound/soc/atmel/tse850-pcm5142.c @@ -58,8 +58,8 @@ struct tse850_priv { static int tse850_get_mux1(struct snd_kcontrol *kctrl, struct snd_ctl_elem_value *ucontrol) { - struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kctrl); - struct snd_soc_card *card = dapm->card; + struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_to_dapm(kctrl); + struct snd_soc_card *card = snd_soc_dapm_to_card(dapm); struct tse850_priv *tse850 = snd_soc_card_get_drvdata(card); ucontrol->value.enumerated.item[0] = tse850->loop1_cache; @@ -70,8 +70,8 @@ static int tse850_get_mux1(struct snd_kcontrol *kctrl, static int tse850_put_mux1(struct snd_kcontrol *kctrl, struct snd_ctl_elem_value *ucontrol) { - struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kctrl); - struct snd_soc_card *card = dapm->card; + struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_to_dapm(kctrl); + struct snd_soc_card *card = snd_soc_dapm_to_card(dapm); struct tse850_priv *tse850 = snd_soc_card_get_drvdata(card); struct soc_enum *e = (struct soc_enum *)kctrl->private_value; unsigned int val = ucontrol->value.enumerated.item[0]; @@ -88,8 +88,8 @@ static int tse850_put_mux1(struct snd_kcontrol *kctrl, static int tse850_get_mux2(struct snd_kcontrol *kctrl, struct snd_ctl_elem_value *ucontrol) { - struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kctrl); - struct snd_soc_card *card = dapm->card; + struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_to_dapm(kctrl); + struct snd_soc_card *card = snd_soc_dapm_to_card(dapm); struct tse850_priv *tse850 = snd_soc_card_get_drvdata(card); ucontrol->value.enumerated.item[0] = tse850->loop2_cache; @@ -100,8 +100,8 @@ static int tse850_get_mux2(struct snd_kcontrol *kctrl, static int tse850_put_mux2(struct snd_kcontrol *kctrl, struct snd_ctl_elem_value *ucontrol) { - struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kctrl); - struct snd_soc_card *card = dapm->card; + struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_to_dapm(kctrl); + struct snd_soc_card *card = snd_soc_dapm_to_card(dapm); struct tse850_priv *tse850 = snd_soc_card_get_drvdata(card); struct soc_enum *e = (struct soc_enum *)kctrl->private_value; unsigned int val = ucontrol->value.enumerated.item[0]; @@ -118,8 +118,8 @@ static int tse850_put_mux2(struct snd_kcontrol *kctrl, static int tse850_get_mix(struct snd_kcontrol *kctrl, struct snd_ctl_elem_value *ucontrol) { - struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kctrl); - struct snd_soc_card *card = dapm->card; + struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_to_dapm(kctrl); + struct snd_soc_card *card = snd_soc_dapm_to_card(dapm); struct tse850_priv *tse850 = snd_soc_card_get_drvdata(card); ucontrol->value.enumerated.item[0] = tse850->add_cache; @@ -130,8 +130,8 @@ static int tse850_get_mix(struct snd_kcontrol *kctrl, static int tse850_put_mix(struct snd_kcontrol *kctrl, struct snd_ctl_elem_value *ucontrol) { - struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kctrl); - struct snd_soc_card *card = dapm->card; + struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_to_dapm(kctrl); + struct snd_soc_card *card = snd_soc_dapm_to_card(dapm); struct tse850_priv *tse850 = snd_soc_card_get_drvdata(card); int connect = !!ucontrol->value.integer.value[0]; @@ -152,8 +152,8 @@ static int tse850_put_mix(struct snd_kcontrol *kctrl, static int tse850_get_ana(struct snd_kcontrol *kctrl, struct snd_ctl_elem_value *ucontrol) { - struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kctrl); - struct snd_soc_card *card = dapm->card; + struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_to_dapm(kctrl); + struct snd_soc_card *card = snd_soc_dapm_to_card(dapm); struct tse850_priv *tse850 = snd_soc_card_get_drvdata(card); int ret; @@ -185,8 +185,8 @@ static int tse850_get_ana(struct snd_kcontrol *kctrl, static int tse850_put_ana(struct snd_kcontrol *kctrl, struct snd_ctl_elem_value *ucontrol) { - struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kctrl); - struct snd_soc_card *card = dapm->card; + struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_to_dapm(kctrl); + struct snd_soc_card *card = snd_soc_dapm_to_card(dapm); struct tse850_priv *tse850 = snd_soc_card_get_drvdata(card); struct soc_enum *e = (struct soc_enum *)kctrl->private_value; unsigned int uV = ucontrol->value.enumerated.item[0];