From: Takashi Iwai <tiwai@suse.de>
To: Damien Zammit <damien.zammit@gmail.com>
Cc: alsa-devel@alsa-project.org, clemens@ladisch.de,
Damien Zammit <damien@zamaudio.com>
Subject: Re: [PATCH 1/3 v4] ALSA: usb-audio: Move mutex define to more general location
Date: Mon, 10 Nov 2014 10:48:23 +0100 [thread overview]
Message-ID: <s5hioinpes8.wl-tiwai@suse.de> (raw)
In-Reply-To: <1415612437-5557-2-git-send-email-damien@zamaudio.com>
At Mon, 10 Nov 2014 20:40:35 +1100,
Damien Zammit wrote:
>
> Allow quirks to lock/unlock the usb audio register mutex by moving
> its definition to usbaudio.h
No, no. The quirk shouldn't touch it at all.
(And, even if so, you should never define a static mutex in a header
file!)
Takashi
>
> Signed-off-by: Damien Zammit <damien@zamaudio.com>
> ---
> 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 */
> --
> 1.9.1
>
next prev parent reply other threads:[~2014-11-10 9:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-10 9:40 [PATCH 0/3 v4] Digidesign Mbox 1 enhancements Damien Zammit
2014-11-10 9:40 ` [PATCH 1/3 v4] ALSA: usb-audio: Move mutex define to more general location Damien Zammit
2014-11-10 9:47 ` Clemens Ladisch
2014-11-10 9:48 ` Takashi Iwai [this message]
2014-11-10 9:40 ` [PATCH 2/3 v4] ALSA: usb-audio: Add mixer control for Digidesign mbox 1 clock source Damien Zammit
2014-11-10 9:47 ` Clemens Ladisch
2014-11-10 9:50 ` Takashi Iwai
2014-11-10 9:40 ` [PATCH 3/3 v4] ALSA: usb-audio: Add duplex mode for Digidesign Mbox 1 and enable mixer Damien Zammit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=s5hioinpes8.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=clemens@ladisch.de \
--cc=damien.zammit@gmail.com \
--cc=damien@zamaudio.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.