fixed race in interrupt handler
authorFrank Mori Hess <fmhess@speakeasy.net>
Fri, 1 Feb 2002 22:23:27 +0000 (22:23 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Fri, 1 Feb 2002 22:23:27 +0000 (22:23 +0000)
comedi/drivers/das16.c

index b2501037c100a091d3810428474aac805179bcc8..b1a55c948845c88e66d2d674345916d69dc33feb 100644 (file)
@@ -1088,6 +1088,9 @@ static void das16_interrupt(int irq, void *d, struct pt_regs *regs)
                return;
        }
 
+       /* clear interrupt */
+       outb(0x00, dev->iobase + DAS16_STATUS);
+
        flags = claim_dma_lock();
        disable_dma(devpriv->dma_chan);
        /* clear flip-flop to make sure 2-byte registers for
@@ -1149,9 +1152,6 @@ static void das16_interrupt(int irq, void *d, struct pt_regs *regs)
        }
 
        comedi_event(dev, s, async->events);
-
-       /* clear interrupt */
-       outb(0x00, dev->iobase + DAS16_STATUS);
 }
 
 static unsigned int das16_set_pacer(comedi_device *dev, unsigned int ns, int rounding_flags)