drivers/usb/gadget: Convert to snd_card_create()
Convert from snd_card_new() to the new snd_card_create() function
for gmidi.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
diff --git a/drivers/usb/gadget/gmidi.c b/drivers/usb/gadget/gmidi.c
index 60d3f9e..14e09ab 100644
--- a/drivers/usb/gadget/gmidi.c
+++ b/drivers/usb/gadget/gmidi.c
@@ -1099,10 +1099,9 @@
.dev_free = gmidi_snd_free,
};
- card = snd_card_new(index, id, THIS_MODULE, 0);
- if (!card) {
- ERROR(dev, "snd_card_new failed\n");
- err = -ENOMEM;
+ err = snd_card_create(index, id, THIS_MODULE, 0, &card);
+ if (err < 0) {
+ ERROR(dev, "snd_card_create failed\n");
goto fail;
}
dev->card = card;