summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2015-05-01 19:02:42 +0300
committerMark Brown <broonie@kernel.org>2015-05-06 19:24:02 +0300
commitc38a1ffbf54f4d1c40a476a2a9ddc9177f493b78 (patch)
tree259cffc5179d81c59ba9a29e9f2131bed6078d4f /sound
parent21a37e39e02d7f57691219fee88cf1d48a74e5bd (diff)
downloadlinux-c38a1ffbf54f4d1c40a476a2a9ddc9177f493b78.tar.xz
ASoC: dapm: Add new widgets to the end of the widget list
Currently new widgets are appended to the beginning of the cards widget list. This has the effect that widgets that are created while iterating over the widget list in snd_soc_dapm_new_widgets() (like e.g. the auto-disable widgets) are not covered during that invocation of the function. If no further invocations of snd_soc_dapm_new_widgets() happen these widgets will not be fully initialized and e.g. no debugfs entries are created for them. By adding new widgets to the end of the widget list we make sure that widgets that are created in snd_soc_dapm_new_widgets() will still be handled during the same snd_soc_dapm_new_widgets() invocation and are always fully initialized. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/soc-dapm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index defe0f0082b5..549165d5790f 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -3169,7 +3169,7 @@ snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm,
INIT_LIST_HEAD(&w->sinks);
INIT_LIST_HEAD(&w->list);
INIT_LIST_HEAD(&w->dirty);
- list_add(&w->list, &dapm->card->widgets);
+ list_add_tail(&w->list, &dapm->card->widgets);
w->inputs = -1;
w->outputs = -1;