diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-10-15 12:16:02 +0200 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2012-11-16 16:46:49 +0000 |
commit | 49b950b1fb8fe2f629b2e362d8461709d18cd27c (patch) | |
tree | 4cfcc6b04433ea0738ddc3fdaf2200e1dcb93eca /sound/usb/usbaudio.h | |
parent | b40a2450225ea92981da4540f437e34661c6180b (diff) | |
download | kernel_samsung_smdk4412-49b950b1fb8fe2f629b2e362d8461709d18cd27c.zip kernel_samsung_smdk4412-49b950b1fb8fe2f629b2e362d8461709d18cd27c.tar.gz kernel_samsung_smdk4412-49b950b1fb8fe2f629b2e362d8461709d18cd27c.tar.bz2 |
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: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'sound/usb/usbaudio.h')
-rw-r--r-- | sound/usb/usbaudio.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/usb/usbaudio.h b/sound/usb/usbaudio.h index 3e2b035..6c805a5 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; |