ALSA: usb-audio: Use rwsem for disconnect protection
authorTakashi Iwai <tiwai@suse.de>
Mon, 15 Oct 2012 10:16:02 +0000 (12:16 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 16 Nov 2012 16:46:49 +0000 (16:46 +0000)
commit49b950b1fb8fe2f629b2e362d8461709d18cd27c
tree4cfcc6b04433ea0738ddc3fdaf2200e1dcb93eca
parentb40a2450225ea92981da4540f437e34661c6180b
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>
sound/usb/card.c
sound/usb/mixer.c
sound/usb/pcm.c
sound/usb/usbaudio.h