diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-01-29 17:22:20 +0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-02-12 14:18:00 +0400 |
commit | 874b8d422e26e21dd432657e25f679c75440c1bc (patch) | |
tree | e88cbcfc629fc791e9310a968cdcd90bddbc4f10 /sound/usb/card.c | |
parent | 60c5772b50fe8ce947685cfe3a80b9bf6ea92831 (diff) | |
download | linux-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/card.c')
-rw-r--r-- | sound/usb/card.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sound/usb/card.c b/sound/usb/card.c index 025224136129..0cfdc2d3b631 100644 --- a/sound/usb/card.c +++ b/sound/usb/card.c @@ -328,7 +328,8 @@ static void remove_trailing_spaces(char *str) /* * create a chip instance and set its names. */ -static int snd_usb_audio_create(struct usb_device *dev, int idx, +static int snd_usb_audio_create(struct usb_interface *intf, + struct usb_device *dev, int idx, const struct snd_usb_audio_quirk *quirk, struct snd_usb_audio **rchip) { @@ -354,7 +355,8 @@ static int snd_usb_audio_create(struct usb_device *dev, int idx, return -ENXIO; } - err = snd_card_create(index[idx], id[idx], THIS_MODULE, 0, &card); + err = snd_card_new(&intf->dev, index[idx], id[idx], THIS_MODULE, + 0, &card); if (err < 0) { snd_printk(KERN_ERR "cannot create card instance %d\n", idx); return err; @@ -513,10 +515,10 @@ snd_usb_audio_probe(struct usb_device *dev, if (enable[i] && ! usb_chip[i] && (vid[i] == -1 || vid[i] == USB_ID_VENDOR(id)) && (pid[i] == -1 || pid[i] == USB_ID_PRODUCT(id))) { - if (snd_usb_audio_create(dev, i, quirk, &chip) < 0) { + if (snd_usb_audio_create(intf, dev, i, quirk, + &chip) < 0) { goto __error; } - snd_card_set_dev(chip->card, &intf->dev); chip->pm_intf = intf; break; } |