summaryrefslogtreecommitdiff
path: root/sound/usb/6fire/chip.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-03-31 12:16:31 +0200
committerTakashi Iwai <tiwai@suse.de>2014-03-31 12:16:31 +0200
commit9ddd84f872898373c51469f9c931d5aa89fdc807 (patch)
treed81f9e396801f04d55924c0d3bbd903fe60ebcda /sound/usb/6fire/chip.c
parent749d32237bf39e6576dd95bfdf24e4378e51716c (diff)
parenta4b7f21d7b42b33609df3f86992a8deff80abfaf (diff)
Merge branch 'for-next' into for-linus
Diffstat (limited to 'sound/usb/6fire/chip.c')
-rw-r--r--sound/usb/6fire/chip.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/sound/usb/6fire/chip.c b/sound/usb/6fire/chip.c
index 66edc4a7917f..dcddfc354ba6 100644
--- a/sound/usb/6fire/chip.c
+++ b/sound/usb/6fire/chip.c
@@ -106,7 +106,7 @@ static int usb6fire_chip_probe(struct usb_interface *intf,
}
if (regidx < 0) {
mutex_unlock(&register_mutex);
- snd_printk(KERN_ERR PREFIX "too many cards registered.\n");
+ dev_err(&intf->dev, "too many cards registered.\n");
return -ENODEV;
}
devices[regidx] = device;
@@ -121,20 +121,19 @@ static int usb6fire_chip_probe(struct usb_interface *intf,
/* if we are here, card can be registered in alsa. */
if (usb_set_interface(device, 0, 0) != 0) {
- snd_printk(KERN_ERR PREFIX "can't set first interface.\n");
+ dev_err(&intf->dev, "can't set first interface.\n");
return -EIO;
}
- ret = snd_card_create(index[regidx], id[regidx], THIS_MODULE,
- sizeof(struct sfire_chip), &card);
+ ret = snd_card_new(&intf->dev, index[regidx], id[regidx],
+ THIS_MODULE, sizeof(struct sfire_chip), &card);
if (ret < 0) {
- snd_printk(KERN_ERR PREFIX "cannot create alsa card.\n");
+ dev_err(&intf->dev, "cannot create alsa card.\n");
return ret;
}
strcpy(card->driver, "6FireUSB");
strcpy(card->shortname, "TerraTec DMX6FireUSB");
sprintf(card->longname, "%s at %d:%d", card->shortname,
device->bus->busnum, device->devnum);
- snd_card_set_dev(card, &intf->dev);
chip = card->private_data;
chips[regidx] = chip;
@@ -169,7 +168,7 @@ static int usb6fire_chip_probe(struct usb_interface *intf,
ret = snd_card_register(card);
if (ret < 0) {
- snd_printk(KERN_ERR PREFIX "cannot register card.");
+ dev_err(&intf->dev, "cannot register card.");
usb6fire_chip_destroy(chip);
return ret;
}