aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/soc/soc-topology.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2015-08-30 15:51:57 +0100
committerMark Brown <broonie@kernel.org>2015-08-30 15:51:57 +0100
commit4253f3a8f4c7835a95dbdef232ad81d0af88fab3 (patch)
treed34d4181d30c3c4ec23da07826ec26df6a749cf9 /sound/soc/soc-topology.c
parentMerge remote-tracking branch 'asoc/topic/core' into asoc-next (diff)
parentASoC: dapm: Consolidate path trace events (diff)
downloadwireguard-linux-4253f3a8f4c7835a95dbdef232ad81d0af88fab3.tar.xz
wireguard-linux-4253f3a8f4c7835a95dbdef232ad81d0af88fab3.zip
Merge remote-tracking branch 'asoc/topic/dapm' into asoc-next
Diffstat (limited to 'sound/soc/soc-topology.c')
-rw-r--r--sound/soc/soc-topology.c25
1 files changed, 1 insertions, 24 deletions
diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c
index 31068b8f3db0..f4e92d35316e 100644
--- a/sound/soc/soc-topology.c
+++ b/sound/soc/soc-topology.c
@@ -1758,7 +1758,6 @@ void snd_soc_tplg_widget_remove_all(struct snd_soc_dapm_context *dapm,
u32 index)
{
struct snd_soc_dapm_widget *w, *next_w;
- struct snd_soc_dapm_path *p, *next_p;
list_for_each_entry_safe(w, next_w, &dapm->card->widgets, list) {
@@ -1770,31 +1769,9 @@ void snd_soc_tplg_widget_remove_all(struct snd_soc_dapm_context *dapm,
if (w->dobj.index != index &&
w->dobj.index != SND_SOC_TPLG_INDEX_ALL)
continue;
-
- list_del(&w->list);
-
- /*
- * remove source and sink paths associated to this widget.
- * While removing the path, remove reference to it from both
- * source and sink widgets so that path is removed only once.
- */
- list_for_each_entry_safe(p, next_p, &w->sources, list_sink) {
- list_del(&p->list_sink);
- list_del(&p->list_source);
- list_del(&p->list);
- kfree(p);
- }
- list_for_each_entry_safe(p, next_p, &w->sinks, list_source) {
- list_del(&p->list_sink);
- list_del(&p->list_source);
- list_del(&p->list);
- kfree(p);
- }
/* check and free and dynamic widget kcontrols */
snd_soc_tplg_widget_remove(w);
- kfree(w->kcontrols);
- kfree(w->name);
- kfree(w);
+ snd_soc_dapm_free_widget(w);
}
}
EXPORT_SYMBOL_GPL(snd_soc_tplg_widget_remove_all);