From: Liam Girdwood Date: Tue, 6 Mar 2012 18:16:18 +0000 (+0000) Subject: ASoC: core: Add platform component mutex X-Git-Tag: v3.4-rc1~88^2^2~23 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=cc22d37e7f5e1745658760660f03793913f43e49;p=karo-tx-linux.git ASoC: core: Add platform component mutex Add mutex support for platform IO operations. e.g. can be used for platform DAPM widget IO ops. Signed-off-by: Liam Girdwood Signed-off-by: Mark Brown --- diff --git a/include/sound/soc.h b/include/sound/soc.h index 82bd773f8ab1..2ebf7877c148 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -718,6 +718,7 @@ struct snd_soc_platform { int id; struct device *dev; struct snd_soc_platform_driver *driver; + struct mutex mutex; unsigned int suspended:1; /* platform is suspended */ unsigned int probed:1; diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 7978f6c01ef7..c90bb0110bd2 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -3382,6 +3382,7 @@ int snd_soc_register_platform(struct device *dev, platform->dapm.dev = dev; platform->dapm.platform = platform; platform->dapm.stream_event = platform_drv->stream_event; + mutex_init(&platform->mutex); mutex_lock(&client_mutex); list_add(&platform->list, &platform_list);