X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sound%2Fisa%2Fsb%2Fsb8_midi.c;h=c549aceea2944ae6a3236301495d443f8dfa5309;hb=9464c7cf61b9433057924c36e6e02f303a00e768;hp=0b67edd7ac6edbb1bce8244535881b303b18be54;hpb=41689045f6a3cbe0550e1d34e9cc20d2e8c432ba;p=linux-2.6.git diff --git a/sound/isa/sb/sb8_midi.c b/sound/isa/sb/sb8_midi.c index 0b67edd7a..c549aceea 100644 --- a/sound/isa/sb/sb8_midi.c +++ b/sound/isa/sb/sb8_midi.c @@ -32,22 +32,20 @@ #include #include +/* + + */ -irqreturn_t snd_sb8dsp_midi_interrupt(struct snd_sb *chip) +irqreturn_t snd_sb8dsp_midi_interrupt(struct snd_sb * chip) { struct snd_rawmidi *rmidi; int max = 64; char byte; - if (!chip) - return IRQ_NONE; - - rmidi = chip->rmidi; - if (!rmidi) { + if (chip == NULL || (rmidi = chip->rmidi) == NULL) { inb(SBP(chip, DATA_AVAIL)); /* ack interrupt */ return IRQ_NONE; } - spin_lock(&chip->midi_input_lock); while (max-- > 0) { if (inb(SBP(chip, DATA_AVAIL)) & 0x80) { @@ -61,6 +59,10 @@ irqreturn_t snd_sb8dsp_midi_interrupt(struct snd_sb *chip) return IRQ_HANDLED; } +/* + + */ + static int snd_sb8dsp_midi_input_open(struct snd_rawmidi_substream *substream) { unsigned long flags; @@ -250,6 +252,10 @@ static void snd_sb8dsp_midi_output_trigger(struct snd_rawmidi_substream *substre snd_sb8dsp_midi_output_write(substream); } +/* + + */ + static struct snd_rawmidi_ops snd_sb8dsp_midi_output = { .open = snd_sb8dsp_midi_output_open,