Skip to content

Commit

Permalink
[ALSA] soc - Don't lock the codec list in snd_soc_dapm_new_widgets()
Browse files Browse the repository at this point in the history
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: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
  • Loading branch information
Mark Brown authored and Jaroslav Kysela committed Jan 31, 2008
1 parent 9af6d95 commit 4b67d35
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions sound/soc/soc-dapm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 4b67d35

Please sign in to comment.