From: Mark Brown Date: Thu, 10 Jan 2008 13:41:46 +0000 (+0100) Subject: [ALSA] soc - Don't lock the codec list in snd_soc_dapm_new_widgets() X-Git-Tag: v2.6.25-rc1~1127^2~133 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4b67d35504d005e94328558ee2c8f661a46aaaf4;p=linux-2.6 [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 for reporting this issue. Cc: Dmitry Baryshkov Signed-off-by: Mark Brown Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela --- diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 8b61db2f63..620d7ea3c1 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -971,7 +971,6 @@ int snd_soc_dapm_new_widgets(struct snd_soc_codec *codec) { struct snd_soc_dapm_widget *w; - mutex_lock(&codec->mutex); list_for_each_entry(w, &codec->dapm_widgets, list) { if (w->new) @@ -1006,7 +1005,6 @@ int snd_soc_dapm_new_widgets(struct snd_soc_codec *codec) } dapm_power_widgets(codec, SND_SOC_DAPM_STREAM_NOP); - mutex_unlock(&codec->mutex); return 0; } EXPORT_SYMBOL_GPL(snd_soc_dapm_new_widgets);