Commit 4b67d355 authored by Mark Brown's avatar Mark Brown Committed by Jaroslav Kysela

[ALSA] soc - Don't lock the codec list in snd_soc_dapm_new_widgets()

snd_soc_dapm_new_widgets() takes the codec lock when adding new widgets,
causing lockdep warnings when applications later call down through ALSA
to adjust controls.  Since widgets are only added during probe this lock
should be unneeded so don't take it.
Thanks to Dmitry Baryshkov <dbaryshkov@gmail.com> for reporting this issue.
Cc: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarJaroslav Kysela <perex@perex.cz>
parent 9af6d956
...@@ -971,7 +971,6 @@ int snd_soc_dapm_new_widgets(struct snd_soc_codec *codec) ...@@ -971,7 +971,6 @@ int snd_soc_dapm_new_widgets(struct snd_soc_codec *codec)
{ {
struct snd_soc_dapm_widget *w; struct snd_soc_dapm_widget *w;
mutex_lock(&codec->mutex);
list_for_each_entry(w, &codec->dapm_widgets, list) list_for_each_entry(w, &codec->dapm_widgets, list)
{ {
if (w->new) if (w->new)
...@@ -1006,7 +1005,6 @@ int snd_soc_dapm_new_widgets(struct snd_soc_codec *codec) ...@@ -1006,7 +1005,6 @@ int snd_soc_dapm_new_widgets(struct snd_soc_codec *codec)
} }
dapm_power_widgets(codec, SND_SOC_DAPM_STREAM_NOP); dapm_power_widgets(codec, SND_SOC_DAPM_STREAM_NOP);
mutex_unlock(&codec->mutex);
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(snd_soc_dapm_new_widgets); EXPORT_SYMBOL_GPL(snd_soc_dapm_new_widgets);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment