Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2728070imm; Tue, 4 Sep 2018 09:04:31 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbP/4CeRJqALDGN40kOoFiYdJopqrS+UqF0GVTE04SSakrglbxw3eahv+kC1wsSYFDjnT2R X-Received: by 2002:a62:4808:: with SMTP id v8-v6mr35677321pfa.89.1536077071108; Tue, 04 Sep 2018 09:04:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536077071; cv=none; d=google.com; s=arc-20160816; b=d6hAQZAa3iF3BsVsOpqSO+z+tX5/M6DaGr3PHOtGEEevMVCsvlnIz9r28C7Jnf8nmJ 4TdhipKVpOb4Q69HdyUbxZ5gU1vYtJCV6eZLdwcXDGD/BciEC7Sf6jd3YWBCcy8EATAG yAaM8EA/1hchlDElKfzZPSXyb65Plt3wwr3kjBcHS8se/t9dlnMSSl7Vu9iVkZtp/BJR 99hXJ6lsut6MQE+BlZzkQ/mbiW7mgnKLpuzDR+y1/TEtFryl3iR3rtDBleorW0xILN2k 4ZohplTG9qKloqLRX6wjDYWoTd7hZBfby3IGLij8E7hgEcrdOlWfZ+iM5upGxXUc+Sbj fDHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=LmVaTn63ZCzN9OTDuQvrtf//pk22jKi07o68ShY/818=; b=eqKbLmPX08nuaHKGLjMHmoTomROKL+eWUPEJcdooQHysVBlRveu7IV3fS9P7nGCvgA TVjMuiHh01IrBTV60t+3GCyfC9DSAptnimUXQjtHQolG7XyxdPVkNv/+ksavtWydpnmP ZW7LKBccIPr2RpdoWFO8RpKAqkyeuiio8PCi0vn8Jo0s47Jx/KA7H5zINGq9popKuuJ8 UuVpnByNmz7iG4/iozmbB7ydnY2DtTZ/Xzb+FkDlXtHu/nC922IjPvXqTapSw5chuEqV wGgxZ7uSEyLMHtkkcOUeIxFmaKXbOqf2EfR+X0DCs+h4dKd5Tap6PrdohpcnKytByCVk tx0g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m76-v6si22354129pfg.323.2018.09.04.09.04.02; Tue, 04 Sep 2018 09:04:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728123AbeIDU0M (ORCPT + 99 others); Tue, 4 Sep 2018 16:26:12 -0400 Received: from mx2.suse.de ([195.135.220.15]:50978 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727767AbeIDUYt (ORCPT ); Tue, 4 Sep 2018 16:24:49 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 5A73AB0AB; Tue, 4 Sep 2018 15:59:02 +0000 (UTC) From: Takashi Iwai To: Greg Kroah-Hartman Cc: Eric Anholt , Stefan Wahren , linux-rpi-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 16/29] staging: bcm2835-audio: Drop superfluous mutex lock during prepare Date: Tue, 4 Sep 2018 17:58:45 +0200 Message-Id: <20180904155858.8001-17-tiwai@suse.de> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180904155858.8001-1-tiwai@suse.de> References: <20180904155858.8001-1-tiwai@suse.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The chip->audio_mutex is used basically for protecting the opened stream assignment, and the prepare callback is irrelevant with it. Signed-off-by: Takashi Iwai --- drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c index 1f9c940f1cc3..9659c25b9f9d 100644 --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c @@ -218,8 +218,6 @@ static int snd_bcm2835_pcm_prepare(struct snd_pcm_substream *substream) int channels; int err; - mutex_lock(&chip->audio_mutex); - /* notify the vchiq that it should enter spdif passthrough mode by * setting channels=0 (see * https://github.com/raspberrypi/linux/issues/528) @@ -233,7 +231,7 @@ static int snd_bcm2835_pcm_prepare(struct snd_pcm_substream *substream) runtime->rate, snd_pcm_format_width(runtime->format)); if (err < 0) - goto out; + return err; memset(&alsa_stream->pcm_indirect, 0, sizeof(alsa_stream->pcm_indirect)); @@ -246,9 +244,7 @@ static int snd_bcm2835_pcm_prepare(struct snd_pcm_substream *substream) alsa_stream->pos = 0; alsa_stream->draining = false; - out: - mutex_unlock(&chip->audio_mutex); - return err; + return 0; } static void snd_bcm2835_pcm_transfer(struct snd_pcm_substream *substream, -- 2.18.0