]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: comedi: addi_apci_3120: absorb apci3120_interrupt_handle_eos()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 4 Nov 2014 17:54:34 +0000 (10:54 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Nov 2014 17:34:01 +0000 (09:34 -0800)
Absorb this simple function into apci3120_interrupt().

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/addi-data/hwdrv_apci3120.c

index 5fb884835643e4f4c2361511a9446c18933fbc84..1913fd2f29dd20dce73b8cb363f75c6cf78a0fd2 100644 (file)
@@ -747,25 +747,6 @@ static void apci3120_interrupt_dma(int irq, void *d)
        }
 }
 
-/*
- * This function handles EOS interrupt.
- * This function copies the acquired data(from FIFO) to Comedi buffer.
- */
-static int apci3120_interrupt_handle_eos(struct comedi_device *dev)
-{
-       struct apci3120_private *devpriv = dev->private;
-       struct comedi_subdevice *s = dev->read_subdev;
-       unsigned short val;
-       int i;
-
-       for (i = 0; i < devpriv->ui_AiNbrofChannels; i++) {
-               val = inw(dev->iobase + 0);
-               comedi_buf_write_samples(s, &val, 1);
-       }
-
-       return 0;
-}
-
 static irqreturn_t apci3120_interrupt(int irq, void *d)
 {
        struct comedi_device *dev = d;
@@ -807,7 +788,14 @@ static irqreturn_t apci3120_interrupt(int irq, void *d)
        /*  Check If EOS interrupt */
        if ((int_daq & 0x2) && (devpriv->b_InterruptMode == APCI3120_EOS_MODE)) {
                if (devpriv->ai_running) {
-                       apci3120_interrupt_handle_eos(dev);
+                       unsigned short val;
+                       int i;
+
+                       for (i = 0; i < devpriv->ui_AiNbrofChannels; i++) {
+                               val = inw(dev->iobase + 0);
+                               comedi_buf_write_samples(s, &val, 1);
+                       }
+
                        devpriv->mode |= APCI3120_MODE_EOS_IRQ_ENA;
                        outb(devpriv->mode, dev->iobase + APCI3120_MODE_REG);
                }