summaryrefslogtreecommitdiffstats
path: root/sound/drivers/virmidi.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-01-29 12:59:08 +0100
committerTakashi Iwai <tiwai@suse.de>2014-02-12 10:58:20 +0100
commit5872f3f621f9f65342583a85ec93b00c0a697eda (patch)
tree6deaa1d968889986fcf84a38abb436961e613f60 /sound/drivers/virmidi.c
parentALSA: Mandate to pass a device pointer at card creation time (diff)
downloadlinux-5872f3f621f9f65342583a85ec93b00c0a697eda.tar.xz
linux-5872f3f621f9f65342583a85ec93b00c0a697eda.zip
ALSA: drivers: 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 '')
-rw-r--r--sound/drivers/virmidi.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/drivers/virmidi.c b/sound/drivers/virmidi.c
index ace3879e8d96..b178724295f3 100644
--- a/sound/drivers/virmidi.c
+++ b/sound/drivers/virmidi.c
@@ -90,8 +90,8 @@ static int snd_virmidi_probe(struct platform_device *devptr)
int idx, err;
int dev = devptr->id;
- err = snd_card_create(index[dev], id[dev], THIS_MODULE,
- sizeof(struct snd_card_virmidi), &card);
+ err = snd_card_new(&devptr->dev, index[dev], id[dev], THIS_MODULE,
+ sizeof(struct snd_card_virmidi), &card);
if (err < 0)
return err;
vmidi = card->private_data;
@@ -118,8 +118,6 @@ static int snd_virmidi_probe(struct platform_device *devptr)
strcpy(card->shortname, "VirMIDI");
sprintf(card->longname, "Virtual MIDI Card %i", dev + 1);
- snd_card_set_dev(card, &devptr->dev);
-
if ((err = snd_card_register(card)) == 0) {
platform_set_drvdata(devptr, card);
return 0;