From patchwork Mon Nov 10 09:40:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damien Zammit X-Patchwork-Id: 5265091 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 842159F3ED for ; Mon, 10 Nov 2014 09:41:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B879520166 for ; Mon, 10 Nov 2014 09:41:52 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 138602015D for ; Mon, 10 Nov 2014 09:41:51 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id F2F6626061E; Mon, 10 Nov 2014 10:41:47 +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.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 6BF9B260640; Mon, 10 Nov 2014 10:41:08 +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 71ED026064C; Mon, 10 Nov 2014 10:41:06 +0100 (CET) Received: from mail-pd0-f174.google.com (mail-pd0-f174.google.com [209.85.192.174]) by alsa0.perex.cz (Postfix) with ESMTP id 01FB7260586 for ; Mon, 10 Nov 2014 10:40:59 +0100 (CET) Received: by mail-pd0-f174.google.com with SMTP id p10so7446623pdj.5 for ; Mon, 10 Nov 2014 01:40:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=zjuJCrLzAE65mAVALw3MyMF74Sp8v5e5Hrf5g1YAj5w=; b=0yWui4TexStMT7noM0D88L53fJw9qUYvoVGrPUuNs5s2mCxiEVSj40kFAUz4A2AErQ 5GWzmtrfv+sw/BUOraPRi/8EPAsLQ2Folml+eAEWOzb3PcMTDdvEYMVEtRkqIwsc/Z2O xeyTwUiVud31QAEcIjY6kJx2DU2TGJswtb2gGGUuanvoN61VbsXd7B2aJijVcWR1gk4N m3RqF7aPn5aLeZDBPvHT5lMOARRzmt+Q/ZZO7dzgAiZJXHg6kTrSbJvlebqWkbczAMaP YcIPbSKUKElKwOvqYZUnxs1Ilchx+6EcCMkovUU8L5O1LJ1mEzMpiBDkPyIyWKrqXiBW Xy1A== X-Received: by 10.70.137.42 with SMTP id qf10mr30858151pdb.100.1415612457856; Mon, 10 Nov 2014 01:40:57 -0800 (PST) Received: from localhost.localdomain (14-201-185-176.static.tpgi.com.au. [14.201.185.176]) by mx.google.com with ESMTPSA id x6sm1569913pdn.16.2014.11.10.01.40.55 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 10 Nov 2014 01:40:57 -0800 (PST) From: Damien Zammit X-Google-Original-From: Damien Zammit To: alsa-devel@alsa-project.org Date: Mon, 10 Nov 2014 20:40:35 +1100 Message-Id: <1415612437-5557-2-git-send-email-damien@zamaudio.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1415612437-5557-1-git-send-email-damien@zamaudio.com> References: <1415612437-5557-1-git-send-email-damien@zamaudio.com> Cc: tiwai@suse.de, Damien Zammit , clemens@ladisch.de Subject: [alsa-devel] [PATCH 1/3 v4] ALSA: usb-audio: Move mutex define to more general location 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 Allow quirks to lock/unlock the usb audio register mutex by moving its definition to usbaudio.h Signed-off-by: Damien Zammit --- sound/usb/card.c | 1 - sound/usb/usbaudio.h | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/usb/card.c b/sound/usb/card.c index 1fab977..d71025b 100644 --- a/sound/usb/card.c +++ b/sound/usb/card.c @@ -106,7 +106,6 @@ MODULE_PARM_DESC(autoclock, "Enable auto-clock selection for UAC2 devices (defau * the all interfaces on the same card as one sound device. */ -static DEFINE_MUTEX(register_mutex); static struct snd_usb_audio *usb_chip[SNDRV_CARDS]; static struct usb_driver usb_audio_driver; diff --git a/sound/usb/usbaudio.h b/sound/usb/usbaudio.h index 91d0380..229978f 100644 --- a/sound/usb/usbaudio.h +++ b/sound/usb/usbaudio.h @@ -115,4 +115,6 @@ struct snd_usb_audio_quirk { #define combine_triple(s) (combine_word(s) | ((unsigned int)(s)[2] << 16)) #define combine_quad(s) (combine_triple(s) | ((unsigned int)(s)[3] << 24)) +static DEFINE_MUTEX(register_mutex); + #endif /* __USBAUDIO_H */