diff options
Diffstat (limited to 'sound/drivers/virmidi.c')
-rw-r--r-- | sound/drivers/virmidi.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sound/drivers/virmidi.c b/sound/drivers/virmidi.c index f79e3614079d..0e631c3221e3 100644 --- a/sound/drivers/virmidi.c +++ b/sound/drivers/virmidi.c | |||
@@ -90,15 +90,17 @@ static int __devinit 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 | card = snd_card_new(index[dev], id[dev], THIS_MODULE, | 93 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, |
94 | sizeof(struct snd_card_virmidi)); | 94 | sizeof(struct snd_card_virmidi), &card); |
95 | if (card == NULL) | 95 | if (err < 0) |
96 | return -ENOMEM; | 96 | return err; |
97 | vmidi = (struct snd_card_virmidi *)card->private_data; | 97 | vmidi = (struct snd_card_virmidi *)card->private_data; |
98 | vmidi->card = card; | 98 | vmidi->card = card; |
99 | 99 | ||
100 | if (midi_devs[dev] > MAX_MIDI_DEVICES) { | 100 | if (midi_devs[dev] > MAX_MIDI_DEVICES) { |
101 | snd_printk("too much midi devices for virmidi %d: force to use %d\n", dev, MAX_MIDI_DEVICES); | 101 | snd_printk(KERN_WARNING |
102 | "too much midi devices for virmidi %d: " | ||
103 | "force to use %d\n", dev, MAX_MIDI_DEVICES); | ||
102 | midi_devs[dev] = MAX_MIDI_DEVICES; | 104 | midi_devs[dev] = MAX_MIDI_DEVICES; |
103 | } | 105 | } |
104 | for (idx = 0; idx < midi_devs[dev]; idx++) { | 106 | for (idx = 0; idx < midi_devs[dev]; idx++) { |