From: H Hartley Sweeten Date: Mon, 5 Oct 2015 21:23:07 +0000 (-0700) Subject: staging: comedi: quatech_daqp_cs: handle shared interrupt X-Git-Tag: firefly_0821_release~176^2~802^2~919 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=77e7c200f37536e05f714bcebc34f58aba9eabfc;p=firefly-linux-kernel-4.4.55.git staging: comedi: quatech_daqp_cs: handle shared interrupt 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 Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/quatech_daqp_cs.c b/drivers/staging/comedi/drivers/quatech_daqp_cs.c index 7432e5761539..c44e7ec19e47 100644 --- a/drivers/staging/comedi/drivers/quatech_daqp_cs.c +++ b/drivers/staging/comedi/drivers/quatech_daqp_cs.c @@ -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;