diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-02-14 09:05:47 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-02-17 10:16:25 +0100 |
commit | e2439a5401486d8b7f1076fc6df9b80143ed62e2 (patch) | |
tree | 3dd69d1751290ac803fe9014db2746523eaac058 /sound/usb/usx2y/usbusx2y.c | |
parent | 1f85a0f0cce583a8ac436bda8807ec8fd8e8ef16 (diff) | |
download | linux-e2439a5401486d8b7f1076fc6df9b80143ed62e2.tar.bz2 |
ALSA: usx2y: Don't peep the card internal object
Avoid traversing the device object list of the card instance just for
checking the PCM streams. The driver's private object already
contains the array of substream pointers, so it can be simply looked
through. The card internal may be restructured in future, thus better
not to rely on it.
Also, this fixes the possible deadlocks in PCM mutex. Instead of
taking multiple PCM mutexes, just take the common mutex in all
places. Along with it, rename prepare_mutex as pcm_mutex.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/usx2y/usbusx2y.c')
-rw-r--r-- | sound/usb/usx2y/usbusx2y.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/usb/usx2y/usbusx2y.c b/sound/usb/usx2y/usbusx2y.c index e38c87302b15..91e0e2a4808c 100644 --- a/sound/usb/usx2y/usbusx2y.c +++ b/sound/usb/usx2y/usbusx2y.c @@ -353,7 +353,7 @@ static int usX2Y_create_card(struct usb_device *device, card->private_free = snd_usX2Y_card_private_free; usX2Y(card)->dev = device; init_waitqueue_head(&usX2Y(card)->prepare_wait_queue); - mutex_init(&usX2Y(card)->prepare_mutex); + mutex_init(&usX2Y(card)->pcm_mutex); INIT_LIST_HEAD(&usX2Y(card)->midi_list); strcpy(card->driver, "USB "NAME_ALLCAPS""); sprintf(card->shortname, "TASCAM "NAME_ALLCAPS""); |