staging: comedi: quatech_daqp_cs: handle shared interrupt
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 5 Oct 2015 21:23:07 +0000 (14:23 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Oct 2015 04:16:05 +0000 (21:16 -0700)
This is a PCMCIA driver and interrupts are always shared. Detect if
the hardware did not produce the interrupt and return IRQ_NONE so
that other drivers might handle it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/quatech_daqp_cs.c

index 7432e57615392dde6c691ba8c21ae92f01997747..c44e7ec19e47f3f613a05951a9a47817110a0626 100644 (file)
@@ -214,6 +214,9 @@ static irqreturn_t daqp_interrupt(int irq, void *dev_id)
                return IRQ_NONE;
 
        status = inb(dev->iobase + DAQP_STATUS_REG);
+       if (!(status & DAQP_STATUS_EVENTS))
+               return IRQ_NONE;
+
        while (!(status & DAQP_STATUS_FIFO_EMPTY)) {
                unsigned short data;