moved clearing of interrupt to beginning of interrupt handler from end.
authorFrank Mori Hess <fmhess@speakeasy.net>
Fri, 14 Dec 2001 19:48:48 +0000 (19:48 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Fri, 14 Dec 2001 19:48:48 +0000 (19:48 +0000)
comedi/drivers/das1800.c

index de37cf456a23799f5aef3893aa7047db34990d45..39c82df1d8470d5875140e9476f13d290f3f16bf 100644 (file)
@@ -103,7 +103,7 @@ TODO:
 #include <linux/module.h>
 #include <linux/sched.h>
 #include <linux/mm.h>
-#include <linux/slab.h>
+#include <linux/malloc.h>
 #include <linux/errno.h>
 #include <linux/ioport.h>
 #include <linux/delay.h>
@@ -897,19 +897,20 @@ static void das1800_interrupt(int irq, void *d, struct pt_regs *regs)
        spin_lock(&dev->spinlock);
        status = inb(dev->iobase + DAS1800_STATUS);
 
+       /* clear interrupt */
+       outb(FNE, dev->iobase + DAS1800_STATUS);
+
        /* if interrupt was not caused by das-1800 */
        if(!(status & INT))
        {
                comedi_error(dev, "spurious interrupt");
+               rt_printk("status 0x%x\n", status);
                spin_unlock(&dev->spinlock);
                return;
        }
 
        das1800_ai_handler(dev, status);
 
-       /* clear interrupt */
-       outb(FNE, dev->iobase + DAS1800_STATUS);
-
        spin_unlock(&dev->spinlock);
 }