diff options
Diffstat (limited to 'sound/usb/usx2y/usbusx2y.c')
-rw-r--r-- | sound/usb/usx2y/usbusx2y.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sound/usb/usx2y/usbusx2y.c b/sound/usb/usx2y/usbusx2y.c index 5a51b18c50f..91e0e2a4808 100644 --- a/sound/usb/usx2y/usbusx2y.c +++ b/sound/usb/usx2y/usbusx2y.c @@ -332,7 +332,9 @@ static struct usb_device_id snd_usX2Y_usb_id_table[] = { { /* terminator */ } }; -static int usX2Y_create_card(struct usb_device *device, struct snd_card **cardp) +static int usX2Y_create_card(struct usb_device *device, + struct usb_interface *intf, + struct snd_card **cardp) { int dev; struct snd_card * card; @@ -343,15 +345,15 @@ static int usX2Y_create_card(struct usb_device *device, struct snd_card **cardp) break; if (dev >= SNDRV_CARDS) return -ENODEV; - err = snd_card_create(index[dev], id[dev], THIS_MODULE, - sizeof(struct usX2Ydev), &card); + err = snd_card_new(&intf->dev, index[dev], id[dev], THIS_MODULE, + sizeof(struct usX2Ydev), &card); if (err < 0) return err; snd_usX2Y_card_used[usX2Y(card)->card_index = dev] = 1; 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""); @@ -382,10 +384,9 @@ static int usX2Y_usb_probe(struct usb_device *device, le16_to_cpu(device->descriptor.idProduct) != USB_ID_US428)) return -EINVAL; - err = usX2Y_create_card(device, &card); + err = usX2Y_create_card(device, intf, &card); if (err < 0) return err; - snd_card_set_dev(card, &intf->dev); if ((err = usX2Y_hwdep_new(card, device)) < 0 || (err = snd_card_register(card)) < 0) { snd_card_free(card); |