From 77e7c200f37536e05f714bcebc34f58aba9eabfc Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Mon, 5 Oct 2015 14:23:07 -0700 Subject: [PATCH] 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 --- drivers/staging/comedi/drivers/quatech_daqp_cs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/staging/comedi/drivers/quatech_daqp_cs.c b/drivers/staging/comedi/drivers/quatech_daqp_cs.c index 7432e57..c44e7ec 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; -- 2.7.4