aboutsummaryrefslogtreecommitdiff
path: root/sound/usb/usbaudio.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-11-07 12:44:10 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-11-17 13:14:22 -0800
commit14565776bea2c57d2f8d1cd7aeee6a0723ac2a05 (patch)
treeb4bfbe23023910f19a5aa5dfba340b08bf4816b9 /sound/usb/usbaudio.h
parentea7b69a0b6816926e85cedbe5e1b1b8d3e2e5500 (diff)
ALSA: usb-audio: Use rwsem for disconnect protection
commit 34f3c89fda4fba9fe689db22253ca8db2f5e6386 upstream. Replace mutex with rwsem for codec->shutdown protection so that concurrent accesses are allowed. Also add the protection to snd_usb_autosuspend() and snd_usb_autoresume(), too. Reported-by: Matthieu CASTET <matthieu.castet@parrot.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound/usb/usbaudio.h')
-rw-r--r--sound/usb/usbaudio.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/usb/usbaudio.h b/sound/usb/usbaudio.h
index 1e79986b577..d4cc9af9ffe 100644
--- a/sound/usb/usbaudio.h
+++ b/sound/usb/usbaudio.h
@@ -36,7 +36,7 @@ struct snd_usb_audio {
struct snd_card *card;
struct usb_interface *pm_intf;
u32 usb_id;
- struct mutex shutdown_mutex;
+ struct rw_semaphore shutdown_rwsem;
unsigned int shutdown:1;
unsigned int probing:1;
unsigned int autosuspended:1;