aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb/6fire/midi.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/usb/6fire/midi.c')
-rw-r--r--sound/usb/6fire/midi.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/sound/usb/6fire/midi.c b/sound/usb/6fire/midi.c
index 8283c5d..13f4509 100644
--- a/sound/usb/6fire/midi.c
+++ b/sound/usb/6fire/midi.c
@@ -20,10 +20,6 @@
#include "chip.h"
#include "comm.h"
-enum {
- MIDI_BUFSIZE = 64
-};
-
static void usb6fire_midi_out_handler(struct urb *urb)
{
struct midi_runtime *rt = urb->context;
@@ -161,12 +157,6 @@ int __devinit usb6fire_midi_init(struct sfire_chip *chip)
if (!rt)
return -ENOMEM;
- rt->out_buffer = kzalloc(MIDI_BUFSIZE, GFP_KERNEL);
- if (!rt->out_buffer) {
- kfree(rt);
- return -ENOMEM;
- }
-
rt->chip = chip;
rt->in_received = usb6fire_midi_in_received;
rt->out_buffer[0] = 0x80; /* 'send midi' command */
@@ -180,7 +170,6 @@ int __devinit usb6fire_midi_init(struct sfire_chip *chip)
ret = snd_rawmidi_new(chip->card, "6FireUSB", 0, 1, 1, &rt->instance);
if (ret < 0) {
- kfree(rt->out_buffer);
kfree(rt);
snd_printk(KERN_ERR PREFIX "unable to create midi.\n");
return ret;
@@ -209,9 +198,6 @@ void usb6fire_midi_abort(struct sfire_chip *chip)
void usb6fire_midi_destroy(struct sfire_chip *chip)
{
- struct midi_runtime *rt = chip->midi;
-
- kfree(rt->out_buffer);
- kfree(rt);
+ kfree(chip->midi);
chip->midi = NULL;
}