From mboxrd@z Thu Jan 1 00:00:00 1970 From: Liam Girdwood Subject: [PATCH 1/2] ASoC: core - Add platform component mutex. Date: Tue, 6 Mar 2012 18:16:18 +0000 Message-ID: <1331057779-4630-1-git-send-email-lrg@ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from na3sys009aog112.obsmtp.com (na3sys009aog112.obsmtp.com [74.125.149.207]) by alsa0.perex.cz (Postfix) with ESMTP id 810932415D for ; Tue, 6 Mar 2012 19:16:32 +0100 (CET) Received: by werc1 with SMTP id c1so4442254wer.35 for ; Tue, 06 Mar 2012 10:16:29 -0800 (PST) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Mark Brown Cc: alsa-devel@alsa-project.org, Liam Girdwood List-Id: alsa-devel@alsa-project.org Add mutex support for platform IO operations. e.g. can be used for platform DAPM widget IO ops. Signed-off-by: Liam Girdwood --- include/sound/soc.h | 1 + sound/soc/soc-core.c | 1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/include/sound/soc.h b/include/sound/soc.h index 82bd773..2ebf787 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 7978f6c..c90bb01 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); -- 1.7.5.4