summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2014-03-07 17:31:28 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-03-17 13:55:54 -0700
commit0056f548138cf863704f675ddd42aa2a01d56b1b (patch)
tree967e5b23dd83de971b57647d355d05811a7b9370
parentdef69d7f8228625626936dd9b75566a1566d7f9f (diff)
staging: comedi: adl_pci9111: use cfc_handle_events()
Use the comedi_fc helper function to automatically call the subdevice (*cancel) function when needed and call comedi_event(). In the Kconfig, COMEDI_ADL_PCI9111 already selects COMEDI_FC. 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>
-rw-r--r--drivers/staging/comedi/drivers/adl_pci9111.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/staging/comedi/drivers/adl_pci9111.c b/drivers/staging/comedi/drivers/adl_pci9111.c
index 80a0560fa6a8..a29ceacb966d 100644
--- a/drivers/staging/comedi/drivers/adl_pci9111.c
+++ b/drivers/staging/comedi/drivers/adl_pci9111.c
@@ -592,9 +592,8 @@ static irqreturn_t pci9111_interrupt(int irq, void *p_device)
spin_unlock_irqrestore(&dev->spinlock, irq_flags);
comedi_error(dev, PCI9111_DRIVER_NAME " fifo overflow");
outb(0, dev->iobase + PCI9111_INT_CLR_REG);
- pci9111_ai_cancel(dev, s);
async->events |= COMEDI_CB_ERROR | COMEDI_CB_EOA;
- comedi_event(dev, s);
+ cfc_handle_events(dev, s);
return IRQ_HANDLED;
}
@@ -672,16 +671,14 @@ static irqreturn_t pci9111_interrupt(int irq, void *p_device)
}
}
- if ((dev_private->stop_counter == 0) && (!dev_private->stop_is_none)) {
+ if (dev_private->stop_counter == 0 && !dev_private->stop_is_none)
async->events |= COMEDI_CB_EOA;
- pci9111_ai_cancel(dev, s);
- }
outb(0, dev->iobase + PCI9111_INT_CLR_REG);
spin_unlock_irqrestore(&dev->spinlock, irq_flags);
- comedi_event(dev, s);
+ cfc_handle_events(dev, s);
return IRQ_HANDLED;
}