aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-core.c
diff options
context:
space:
mode:
authorLiam Girdwood <lrg@ti.com>2012-03-07 05:38:25 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-04-01 06:28:21 -0400
commit01b9d99a1f45befa604543ead29f44fdb0878844 (patch)
treee71ae8fc98724700968b18d6756091fb3f54cf3e /sound/soc/soc-core.c
parent253322c18830965331e54ee33c5e8064a2f15717 (diff)
ASoC: core: Add card mutex locking subclasses
This is the first part of a change that is intended to improve ASoC locking protection for DAPM and PCM operations. This part of the series adds a mutex class for the soc_card mutex. The SND_SOC_CARD_CLASS_INIT class is used for card initialisation only whilst the SND_SOC_CARD_CLASS_PCM class is used for the forth coming Dynamic PCM operations. The new mutex classes are required otherwise we will see a false positive mutex deadlock warning between the card initialisation and the PCM operations (something that would never deadlock in real life). Signed-off-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r--sound/soc/soc-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index a4deebc0801a..a6da20a72d43 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1416,7 +1416,7 @@ static void snd_soc_instantiate_card(struct snd_soc_card *card)
1416 struct snd_soc_dai_link *dai_link; 1416 struct snd_soc_dai_link *dai_link;
1417 int ret, i, order; 1417 int ret, i, order;
1418 1418
1419 mutex_lock(&card->mutex); 1419 mutex_lock_nested(&card->mutex, SND_SOC_CARD_CLASS_INIT);
1420 1420
1421 if (card->instantiated) { 1421 if (card->instantiated) {
1422 mutex_unlock(&card->mutex); 1422 mutex_unlock(&card->mutex);