summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/f_midi.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-01-29 18:04:31 +0400
committerTakashi Iwai <tiwai@suse.de>2014-02-14 11:14:11 +0400
commit133450953040c9c6af986f65821a5ccebbe16e27 (patch)
treed0df44c416858f3013a77ab31c552fb7e15ae0fd /drivers/usb/gadget/f_midi.c
parent3a3d2afd0844e00b29c8edf91595374c5b5c4dcc (diff)
downloadlinux-133450953040c9c6af986f65821a5ccebbe16e27.tar.xz
usb: gadget: 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 'drivers/usb/gadget/f_midi.c')
-rw-r--r--drivers/usb/gadget/f_midi.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/usb/gadget/f_midi.c b/drivers/usb/gadget/f_midi.c
index 36d4bb23087f..807b31c0edc3 100644
--- a/drivers/usb/gadget/f_midi.c
+++ b/drivers/usb/gadget/f_midi.c
@@ -664,9 +664,10 @@ static int f_midi_register_card(struct f_midi *midi)
.dev_free = f_midi_snd_free,
};
- err = snd_card_create(midi->index, midi->id, THIS_MODULE, 0, &card);
+ err = snd_card_new(&midi->gadget->dev, midi->index, midi->id,
+ THIS_MODULE, 0, &card);
if (err < 0) {
- ERROR(midi, "snd_card_create() failed\n");
+ ERROR(midi, "snd_card_new() failed\n");
goto fail;
}
midi->card = card;
@@ -703,8 +704,6 @@ static int f_midi_register_card(struct f_midi *midi)
snd_rawmidi_set_ops(rmidi, SNDRV_RAWMIDI_STREAM_OUTPUT, &gmidi_in_ops);
snd_rawmidi_set_ops(rmidi, SNDRV_RAWMIDI_STREAM_INPUT, &gmidi_out_ops);
- snd_card_set_dev(card, &midi->gadget->dev);
-
/* register it - we're ready to go */
err = snd_card_register(card);
if (err < 0) {