staging: comedi: cb_pcidas: remove forward declarations 5
authorH Hartley Sweeten <hartleys@visionengravers.com>
Wed, 27 Jun 2012 00:49:22 +0000 (17:49 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Jul 2012 22:23:48 +0000 (15:23 -0700)
Move the cb_pcida_ao_cancel function to remove the need for
the forward declaration.

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

index fa3ed0e01b33fcb9caaf8ca8e8c158179790c0d1..24574082691e2c8ef646f3a6c65db1cfb86db213 100644 (file)
@@ -447,8 +447,6 @@ struct cb_pcidas_private {
  */
 #define devpriv ((struct cb_pcidas_private *)dev->private)
 
-static int cb_pcidas_ao_cancel(struct comedi_device *dev,
-                              struct comedi_subdevice *s);
 static void cb_pcidas_load_counters(struct comedi_device *dev, unsigned int *ns,
                                    int round_flags);
 static int caldac_8800_write(struct comedi_device *dev, unsigned int address,
@@ -1262,6 +1260,25 @@ static int cb_pcidas_ao_cmd(struct comedi_device *dev,
        return 0;
 }
 
+/* cancel analog output command */
+static int cb_pcidas_ao_cancel(struct comedi_device *dev,
+                              struct comedi_subdevice *s)
+{
+       unsigned long flags;
+
+       spin_lock_irqsave(&dev->spinlock, flags);
+       /*  disable interrupts */
+       devpriv->adc_fifo_bits &= ~DAHFIE & ~DAEMIE;
+       outw(devpriv->adc_fifo_bits, devpriv->control_status + INT_ADCFIFO);
+
+       /*  disable output */
+       devpriv->ao_control_bits &= ~DACEN & ~DAC_PACER_MASK;
+       outw(devpriv->ao_control_bits, devpriv->control_status + DAC_CSR);
+       spin_unlock_irqrestore(&dev->spinlock, flags);
+
+       return 0;
+}
+
 static void handle_ao_interrupt(struct comedi_device *dev, unsigned int status)
 {
        struct comedi_subdevice *s = dev->write_subdev;
@@ -1427,25 +1444,6 @@ static irqreturn_t cb_pcidas_interrupt(int irq, void *d)
        return IRQ_HANDLED;
 }
 
-/* cancel analog output command */
-static int cb_pcidas_ao_cancel(struct comedi_device *dev,
-                              struct comedi_subdevice *s)
-{
-       unsigned long flags;
-
-       spin_lock_irqsave(&dev->spinlock, flags);
-       /*  disable interrupts */
-       devpriv->adc_fifo_bits &= ~DAHFIE & ~DAEMIE;
-       outw(devpriv->adc_fifo_bits, devpriv->control_status + INT_ADCFIFO);
-
-       /*  disable output */
-       devpriv->ao_control_bits &= ~DACEN & ~DAC_PACER_MASK;
-       outw(devpriv->ao_control_bits, devpriv->control_status + DAC_CSR);
-       spin_unlock_irqrestore(&dev->spinlock, flags);
-
-       return 0;
-}
-
 static void cb_pcidas_load_counters(struct comedi_device *dev, unsigned int *ns,
                                    int rounding_flags)
 {