diff options
author | Daniel Mack <zonque@gmail.com> | 2012-04-12 07:51:10 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-04-13 04:21:55 -0400 |
commit | 596580d0ee1d17af70920a7bb06c963418014dd1 (patch) | |
tree | f849b2f0a5b7ea698efcdc26878b73939ad7a835 /sound/usb | |
parent | dd775ae2549217d3ae09363e3edb305d0fa19928 (diff) |
ALSA: snd-usb: add snd_usb_audio-wide mutex
This is needed for new card-wide list operations.
Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb')
-rw-r--r-- | sound/usb/card.c | 2 | ||||
-rw-r--r-- | sound/usb/usbaudio.h | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/sound/usb/card.c b/sound/usb/card.c index 4a7be7b98331..6bc88b7ce4fd 100644 --- a/sound/usb/card.c +++ b/sound/usb/card.c | |||
@@ -276,6 +276,7 @@ static int snd_usb_create_streams(struct snd_usb_audio *chip, int ctrlif) | |||
276 | 276 | ||
277 | static int snd_usb_audio_free(struct snd_usb_audio *chip) | 277 | static int snd_usb_audio_free(struct snd_usb_audio *chip) |
278 | { | 278 | { |
279 | mutex_destroy(&chip->mutex); | ||
279 | kfree(chip); | 280 | kfree(chip); |
280 | return 0; | 281 | return 0; |
281 | } | 282 | } |
@@ -336,6 +337,7 @@ static int snd_usb_audio_create(struct usb_device *dev, int idx, | |||
336 | return -ENOMEM; | 337 | return -ENOMEM; |
337 | } | 338 | } |
338 | 339 | ||
340 | mutex_init(&chip->mutex); | ||
339 | mutex_init(&chip->shutdown_mutex); | 341 | mutex_init(&chip->shutdown_mutex); |
340 | chip->index = idx; | 342 | chip->index = idx; |
341 | chip->dev = dev; | 343 | chip->dev = dev; |
diff --git a/sound/usb/usbaudio.h b/sound/usb/usbaudio.h index 3e2b03577936..a16c21d2d7ed 100644 --- a/sound/usb/usbaudio.h +++ b/sound/usb/usbaudio.h | |||
@@ -36,6 +36,7 @@ struct snd_usb_audio { | |||
36 | struct snd_card *card; | 36 | struct snd_card *card; |
37 | struct usb_interface *pm_intf; | 37 | struct usb_interface *pm_intf; |
38 | u32 usb_id; | 38 | u32 usb_id; |
39 | struct mutex mutex; | ||
39 | struct mutex shutdown_mutex; | 40 | struct mutex shutdown_mutex; |
40 | unsigned int shutdown:1; | 41 | unsigned int shutdown:1; |
41 | unsigned int probing:1; | 42 | unsigned int probing:1; |