mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
ASoC: audio_helper: 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 <kuninori.morimoto.gx@renesas.com> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/877bvxa0d6.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
committed by
Mark Brown
parent
64f90b329f
commit
ed71deee19
@@ -115,12 +115,13 @@ int gbaudio_dapm_free_controls(struct snd_soc_dapm_context *dapm,
|
||||
{
|
||||
int i;
|
||||
struct snd_soc_dapm_widget *w, *tmp_w;
|
||||
struct snd_soc_card *card = snd_soc_dapm_to_card(dapm);
|
||||
|
||||
mutex_lock(&dapm->card->dapm_mutex);
|
||||
mutex_lock(&card->dapm_mutex);
|
||||
for (i = 0; i < num; i++) {
|
||||
/* below logic can be optimized to identify widget pointer */
|
||||
w = NULL;
|
||||
list_for_each_entry(tmp_w, &dapm->card->widgets, list) {
|
||||
list_for_each_entry(tmp_w, &card->widgets, list) {
|
||||
if (tmp_w->dapm == dapm &&
|
||||
!strcmp(tmp_w->name, widget->name)) {
|
||||
w = tmp_w;
|
||||
@@ -128,7 +129,7 @@ int gbaudio_dapm_free_controls(struct snd_soc_dapm_context *dapm,
|
||||
}
|
||||
}
|
||||
if (!w) {
|
||||
dev_err(dapm->dev, "%s: widget not found\n",
|
||||
dev_err(card->dev, "%s: widget not found\n",
|
||||
widget->name);
|
||||
widget++;
|
||||
continue;
|
||||
@@ -136,7 +137,7 @@ int gbaudio_dapm_free_controls(struct snd_soc_dapm_context *dapm,
|
||||
widget++;
|
||||
gbaudio_dapm_free_widget(w);
|
||||
}
|
||||
mutex_unlock(&dapm->card->dapm_mutex);
|
||||
mutex_unlock(&card->dapm_mutex);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user