aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb/card.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/usb/card.c')
-rw-r--r--sound/usb/card.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sound/usb/card.c b/sound/usb/card.c
index 220c6167dd8..781d9e61adf 100644
--- a/sound/usb/card.c
+++ b/sound/usb/card.c
@@ -433,9 +433,10 @@ static int snd_usb_audio_create(struct usb_device *dev, int idx,
433 * only at the first time. the successive calls of this function will 433 * only at the first time. the successive calls of this function will
434 * append the pcm interface to the corresponding card. 434 * append the pcm interface to the corresponding card.
435 */ 435 */
436static void *snd_usb_audio_probe(struct usb_device *dev, 436static struct snd_usb_audio *
437 struct usb_interface *intf, 437snd_usb_audio_probe(struct usb_device *dev,
438 const struct usb_device_id *usb_id) 438 struct usb_interface *intf,
439 const struct usb_device_id *usb_id)
439{ 440{
440 const struct snd_usb_audio_quirk *quirk = (const struct snd_usb_audio_quirk *)usb_id->driver_info; 441 const struct snd_usb_audio_quirk *quirk = (const struct snd_usb_audio_quirk *)usb_id->driver_info;
441 int i, err; 442 int i, err;
@@ -540,16 +541,15 @@ static void *snd_usb_audio_probe(struct usb_device *dev,
540 * we need to take care of counter, since disconnection can be called also 541 * we need to take care of counter, since disconnection can be called also
541 * many times as well as usb_audio_probe(). 542 * many times as well as usb_audio_probe().
542 */ 543 */
543static void snd_usb_audio_disconnect(struct usb_device *dev, void *ptr) 544static void snd_usb_audio_disconnect(struct usb_device *dev,
545 struct snd_usb_audio *chip)
544{ 546{
545 struct snd_usb_audio *chip;
546 struct snd_card *card; 547 struct snd_card *card;
547 struct list_head *p; 548 struct list_head *p;
548 549
549 if (ptr == (void *)-1L) 550 if (chip == (void *)-1L)
550 return; 551 return;
551 552
552 chip = ptr;
553 card = chip->card; 553 card = chip->card;
554 mutex_lock(&register_mutex); 554 mutex_lock(&register_mutex);
555 mutex_lock(&chip->shutdown_mutex); 555 mutex_lock(&chip->shutdown_mutex);
@@ -585,7 +585,7 @@ static void snd_usb_audio_disconnect(struct usb_device *dev, void *ptr)
585static int usb_audio_probe(struct usb_interface *intf, 585static int usb_audio_probe(struct usb_interface *intf,
586 const struct usb_device_id *id) 586 const struct usb_device_id *id)
587{ 587{
588 void *chip; 588 struct snd_usb_audio *chip;
589 chip = snd_usb_audio_probe(interface_to_usbdev(intf), intf, id); 589 chip = snd_usb_audio_probe(interface_to_usbdev(intf), intf, id);
590 if (chip) { 590 if (chip) {
591 usb_set_intfdata(intf, chip); 591 usb_set_intfdata(intf, chip);