Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph...
[pandora-kernel.git] / sound / isa / sb / sb8_midi.c
index c549ace..988a8b7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright (c) by Jaroslav Kysela <perex@suse.cz>
+ *  Copyright (c) by Jaroslav Kysela <perex@perex.cz>
  *  Routines for control of SoundBlaster cards - MIDI interface
  *
  *   This program is free software; you can redistribute it and/or modify
  *   Added full duplex UART mode for DSP version 2.0 and later.
  */
 
-#include <sound/driver.h>
 #include <asm/io.h>
 #include <linux/time.h>
 #include <sound/core.h>
 #include <sound/sb.h>
 
-/*
-
- */
 
-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 == NULL || (rmidi = chip->rmidi) == NULL) {
+       if (!chip)
+               return IRQ_NONE;
+       
+       rmidi = chip->rmidi;
+       if (!rmidi) {
                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) {
@@ -59,10 +60,6 @@ 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;
@@ -252,10 +249,6 @@ 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,