summaryrefslogtreecommitdiff
path: root/sound/usb/hiface
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-01-29 17:22:20 +0400
committerTakashi Iwai <tiwai@suse.de>2014-02-12 14:18:00 +0400
commit874b8d422e26e21dd432657e25f679c75440c1bc (patch)
treee88cbcfc629fc791e9310a968cdcd90bddbc4f10 /sound/usb/hiface
parent60c5772b50fe8ce947685cfe3a80b9bf6ea92831 (diff)
downloadlinux-874b8d422e26e21dd432657e25f679c75440c1bc.tar.xz
ALSA: usb: Convert to snd_card_new() with a device pointer
Also remove superfluous snd_card_set_dev() calls. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/hiface')
-rw-r--r--sound/usb/hiface/chip.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/usb/hiface/chip.c b/sound/usb/hiface/chip.c
index b0dcb3924ce5..2670d646bda9 100644
--- a/sound/usb/hiface/chip.c
+++ b/sound/usb/hiface/chip.c
@@ -64,7 +64,8 @@ struct hiface_vendor_quirk {
u8 extra_freq;
};
-static int hiface_chip_create(struct usb_device *device, int idx,
+static int hiface_chip_create(struct usb_interface *intf,
+ struct usb_device *device, int idx,
const struct hiface_vendor_quirk *quirk,
struct hiface_chip **rchip)
{
@@ -76,7 +77,8 @@ static int hiface_chip_create(struct usb_device *device, int idx,
*rchip = NULL;
/* if we are here, card can be registered in alsa. */
- ret = snd_card_create(index[idx], id[idx], THIS_MODULE, sizeof(*chip), &card);
+ ret = snd_card_new(&intf->dev, index[idx], id[idx], THIS_MODULE,
+ sizeof(*chip), &card);
if (ret < 0) {
dev_err(&device->dev, "cannot create alsa card.\n");
return ret;
@@ -132,12 +134,10 @@ static int hiface_chip_probe(struct usb_interface *intf,
goto err;
}
- ret = hiface_chip_create(device, i, quirk, &chip);
+ ret = hiface_chip_create(intf, device, i, quirk, &chip);
if (ret < 0)
goto err;
- snd_card_set_dev(chip->card, &intf->dev);
-
ret = hiface_pcm_init(chip, quirk ? quirk->extra_freq : 0);
if (ret < 0)
goto err_chip_destroy;