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>
This commit is contained in:
Takashi Iwai
2014-01-29 14:22:20 +01:00
parent 60c5772b50
commit 874b8d422e
7 changed files with 31 additions and 29 deletions

View File

@@ -1243,8 +1243,9 @@ static int ua101_probe(struct usb_interface *interface,
mutex_unlock(&devices_mutex);
return -ENOENT;
}
err = snd_card_create(index[card_index], id[card_index], THIS_MODULE,
sizeof(*ua), &card);
err = snd_card_new(&interface->dev,
index[card_index], id[card_index], THIS_MODULE,
sizeof(*ua), &card);
if (err < 0) {
mutex_unlock(&devices_mutex);
return err;
@@ -1283,8 +1284,6 @@ static int ua101_probe(struct usb_interface *interface,
}
}
snd_card_set_dev(card, &interface->dev);
err = detect_usb_format(ua);
if (err < 0)
goto probe_error;