[PATCH 01/16] staging: comedi: ni_pcimio: remove forward declarations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Move some functions to avoid the need for the forward declarations.

Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
Cc: Ian Abbott <abbotti@xxxxxxxxx>
Cc: Greg Kroah-Hartman <gregk@xxxxxxxxxxxxxxxxxxx>
---
 drivers/staging/comedi/drivers/ni_pcimio.c | 134 +++++++++++++----------------
 1 file changed, 62 insertions(+), 72 deletions(-)

diff --git a/drivers/staging/comedi/drivers/ni_pcimio.c b/drivers/staging/comedi/drivers/ni_pcimio.c
index 177947c..faa7eb7 100644
--- a/drivers/staging/comedi/drivers/ni_pcimio.c
+++ b/drivers/staging/comedi/drivers/ni_pcimio.c
@@ -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,
-- 
1.9.3

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux