aboutsummaryrefslogtreecommitdiffstats
path: root/sound/drivers/virmidi.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/drivers/virmidi.c')
-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)
90 int idx, err; 90 int idx, err;
91 int dev = devptr->id; 91 int dev = devptr->id;
92 92
93 err = snd_card_create(index[dev], id[dev], THIS_MODULE, 93 err = snd_card_new(&devptr->dev, index[dev], id[dev], THIS_MODULE,
94 sizeof(struct snd_card_virmidi), &card); 94 sizeof(struct snd_card_virmidi), &card);
95 if (err < 0) 95 if (err < 0)
96 return err; 96 return err;
97 vmidi = card->private_data; 97 vmidi = card->private_data;
@@ -118,8 +118,6 @@ static int snd_virmidi_probe(struct platform_device *devptr)
118 strcpy(card->shortname, "VirMIDI"); 118 strcpy(card->shortname, "VirMIDI");
119 sprintf(card->longname, "Virtual MIDI Card %i", dev + 1); 119 sprintf(card->longname, "Virtual MIDI Card %i", dev + 1);
120 120
121 snd_card_set_dev(card, &devptr->dev);
122
123 if ((err = snd_card_register(card)) == 0) { 121 if ((err = snd_card_register(card)) == 0) {
124 platform_set_drvdata(devptr, card); 122 platform_set_drvdata(devptr, card);
125 return 0; 123 return 0;