staging: comedi: ni_pcimio: remove forward declarations
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Fri, 20 Jun 2014 18:10:20 +0000 (11:10 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 29 Jun 2014 21:17:58 +0000 (14:17 -0700)
Move some functions to avoid the need for the forward declarations.

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/ni_pcimio.c

index 177947c09117cec6e9f723c199ac27962cf8ba8b..faa7eb7f1d975a1e12a737601cc3711d36bb9798 100644 (file)
@@ -1050,18 +1050,75 @@ static const struct ni_board_struct ni_boards[] = {
 #include "ni_mio_common.c"
 
 static int pcimio_ai_change(struct comedi_device *dev,
-                           struct comedi_subdevice *s, unsigned long new_size);
+                           struct comedi_subdevice *s,
+                           unsigned long new_size)
+{
+       struct ni_private *devpriv = dev->private;
+       int ret;
+
+       ret = mite_buf_change(devpriv->ai_mite_ring, s);
+       if (ret < 0)
+               return ret;
+
+       return 0;
+}
+
 static int pcimio_ao_change(struct comedi_device *dev,
-                           struct comedi_subdevice *s, unsigned long new_size);
+                           struct comedi_subdevice *s,
+                           unsigned long new_size)
+{
+       struct ni_private *devpriv = dev->private;
+       int ret;
+
+       ret = mite_buf_change(devpriv->ao_mite_ring, s);
+       if (ret < 0)
+               return ret;
+
+       return 0;
+}
+
 static int pcimio_gpct0_change(struct comedi_device *dev,
                               struct comedi_subdevice *s,
-                              unsigned long new_size);
+                              unsigned long new_size)
+{
+       struct ni_private *devpriv = dev->private;
+       int ret;
+
+       ret = mite_buf_change(devpriv->gpct_mite_ring[0], s);
+       if (ret < 0)
+               return ret;
+
+       return 0;
+}
+
 static int pcimio_gpct1_change(struct comedi_device *dev,
                               struct comedi_subdevice *s,
-                              unsigned long new_size);
+                              unsigned long new_size)
+{
+       struct ni_private *devpriv = dev->private;
+       int ret;
+
+       ret = mite_buf_change(devpriv->gpct_mite_ring[1], s);
+       if (ret < 0)
+               return ret;
+
+       return 0;
+}
+
 static int pcimio_dio_change(struct comedi_device *dev,
                             struct comedi_subdevice *s,
-                            unsigned long new_size);
+                            unsigned long new_size)
+{
+       struct ni_private *devpriv = dev->private;
+       int ret;
+
+       ret = mite_buf_change(devpriv->cdo_mite_ring, s);
+       if (ret < 0)
+               return ret;
+
+       return 0;
+}
+
 
 static void m_series_init_eeprom_buffer(struct comedi_device *dev)
 {
@@ -1230,73 +1287,6 @@ static int pcimio_auto_attach(struct comedi_device *dev,
        return 0;
 }
 
-static int pcimio_ai_change(struct comedi_device *dev,
-                           struct comedi_subdevice *s, unsigned long new_size)
-{
-       struct ni_private *devpriv = dev->private;
-       int ret;
-
-       ret = mite_buf_change(devpriv->ai_mite_ring, s);
-       if (ret < 0)
-               return ret;
-
-       return 0;
-}
-
-static int pcimio_ao_change(struct comedi_device *dev,
-                           struct comedi_subdevice *s, unsigned long new_size)
-{
-       struct ni_private *devpriv = dev->private;
-       int ret;
-
-       ret = mite_buf_change(devpriv->ao_mite_ring, s);
-       if (ret < 0)
-               return ret;
-
-       return 0;
-}
-
-static int pcimio_gpct0_change(struct comedi_device *dev,
-                              struct comedi_subdevice *s,
-                              unsigned long new_size)
-{
-       struct ni_private *devpriv = dev->private;
-       int ret;
-
-       ret = mite_buf_change(devpriv->gpct_mite_ring[0], s);
-       if (ret < 0)
-               return ret;
-
-       return 0;
-}
-
-static int pcimio_gpct1_change(struct comedi_device *dev,
-                              struct comedi_subdevice *s,
-                              unsigned long new_size)
-{
-       struct ni_private *devpriv = dev->private;
-       int ret;
-
-       ret = mite_buf_change(devpriv->gpct_mite_ring[1], s);
-       if (ret < 0)
-               return ret;
-
-       return 0;
-}
-
-static int pcimio_dio_change(struct comedi_device *dev,
-                            struct comedi_subdevice *s, unsigned long new_size)
-{
-       struct ni_private *devpriv = dev->private;
-       int ret;
-
-       ret = mite_buf_change(devpriv->cdo_mite_ring, s);
-       if (ret < 0)
-               return ret;
-
-       return 0;
-}
-
 static struct comedi_driver ni_pcimio_driver = {
        .driver_name    = "ni_pcimio",
        .module         = THIS_MODULE,