From patchwork Sat Feb 22 17:44:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lars-Peter Clausen X-Patchwork-Id: 3701751 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0E4409F382 for ; Sat, 22 Feb 2014 17:44:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 273522018B for ; Sat, 22 Feb 2014 17:44:28 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id E99692017D for ; Sat, 22 Feb 2014 17:44:26 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 7CBF12625F7; Sat, 22 Feb 2014 18:44:20 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NO_DNS_FOR_FROM, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 478EE261B2A; Sat, 22 Feb 2014 18:44:10 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id A1A63261B2B; Sat, 22 Feb 2014 18:44:09 +0100 (CET) Received: from smtp-out-015.synserver.de (smtp-out-133.synserver.de [212.40.185.133]) by alsa0.perex.cz (Postfix) with ESMTP id AB55E261B0C for ; Sat, 22 Feb 2014 18:44:02 +0100 (CET) Received: (qmail 7414 invoked by uid 0); 22 Feb 2014 17:43:59 -0000 X-SynServer-TrustedSrc: 1 X-SynServer-AuthUser: lars@metafoo.de X-SynServer-PPID: 7167 Received: from ppp-46-244-149-120.dynamic.mnet-online.de (HELO lars-adi-laptop.fritz.box) [46.244.149.120] by 217.119.54.77 with SMTP; 22 Feb 2014 17:43:58 -0000 From: Lars-Peter Clausen To: Mark Brown , Liam Girdwood Date: Sat, 22 Feb 2014 18:44:17 +0100 Message-Id: <1393091057-13510-1-git-send-email-lars@metafoo.de> X-Mailer: git-send-email 1.8.0 Cc: Russell King , alsa-devel@alsa-project.org, Lars-Peter Clausen , Eric Miao , Haojian Zhuang Subject: [alsa-devel] [PATCH] ASoC: pxa: Remove superfluous locking X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP The locking here was added in commit 71a295602e ("ASoC: Lock the CODEC in PXA external jack controls") to protect the DAPM changes that are made inside of ${board}_ext_control() against concurrent updates. The ASoC core was updated in commit a73fb2df01 ("ASoC: dapm: Use DAPM mutex for DAPM ops instead of codec mutex") to use a card wide lock rather the CODEC mutex to protect DAPM operations. We now have proper locking inside ${board}_ext_control() itself, so taking the CODEC lock can be removed. Signed-off-by: Lars-Peter Clausen --- sound/soc/pxa/corgi.c | 4 ---- sound/soc/pxa/magician.c | 4 ---- sound/soc/pxa/poodle.c | 4 ---- sound/soc/pxa/spitz.c | 4 ---- sound/soc/pxa/tosa.c | 4 ---- 5 files changed, 20 deletions(-) diff --git a/sound/soc/pxa/corgi.c b/sound/soc/pxa/corgi.c index 9d9c8ad..b4db3b9 100644 --- a/sound/soc/pxa/corgi.c +++ b/sound/soc/pxa/corgi.c @@ -103,13 +103,9 @@ static int corgi_startup(struct snd_pcm_substream *substream) struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_codec *codec = rtd->codec; - mutex_lock(&codec->mutex); - /* check the jack status at stream startup */ corgi_ext_control(&codec->dapm); - mutex_unlock(&codec->mutex); - return 0; } diff --git a/sound/soc/pxa/magician.c b/sound/soc/pxa/magician.c index 31242be..41ab6678 100644 --- a/sound/soc/pxa/magician.c +++ b/sound/soc/pxa/magician.c @@ -77,13 +77,9 @@ static int magician_startup(struct snd_pcm_substream *substream) struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_codec *codec = rtd->codec; - mutex_lock(&codec->mutex); - /* check the jack status at stream startup */ magician_ext_control(codec); - mutex_unlock(&codec->mutex); - return 0; } diff --git a/sound/soc/pxa/poodle.c b/sound/soc/pxa/poodle.c index c93e138..27c6c03 100644 --- a/sound/soc/pxa/poodle.c +++ b/sound/soc/pxa/poodle.c @@ -76,13 +76,9 @@ static int poodle_startup(struct snd_pcm_substream *substream) struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_codec *codec = rtd->codec; - mutex_lock(&codec->mutex); - /* check the jack status at stream startup */ poodle_ext_control(&codec->dapm); - mutex_unlock(&codec->mutex); - return 0; } diff --git a/sound/soc/pxa/spitz.c b/sound/soc/pxa/spitz.c index 04dbb5a..a3a13c9 100644 --- a/sound/soc/pxa/spitz.c +++ b/sound/soc/pxa/spitz.c @@ -113,13 +113,9 @@ static int spitz_startup(struct snd_pcm_substream *substream) struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_codec *codec = rtd->codec; - mutex_lock(&codec->mutex); - /* check the jack status at stream startup */ spitz_ext_control(&codec->dapm); - mutex_unlock(&codec->mutex); - return 0; } diff --git a/sound/soc/pxa/tosa.c b/sound/soc/pxa/tosa.c index 2a4b438..cead165 100644 --- a/sound/soc/pxa/tosa.c +++ b/sound/soc/pxa/tosa.c @@ -84,13 +84,9 @@ static int tosa_startup(struct snd_pcm_substream *substream) struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_codec *codec = rtd->codec; - mutex_lock(&codec->mutex); - /* check the jack status at stream startup */ tosa_ext_control(codec); - mutex_unlock(&codec->mutex); - return 0; }