[PATCH 10/12] staging: comedi: ni_mio_cs: remove last forward declaration

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

 



Move the ni_getboardtype() function to remove the last forward
declaration in this file.

Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
Cc: Ian Abbott <abbotti@xxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/staging/comedi/drivers/ni_mio_cs.c | 33 ++++++++++++++----------------
 1 file changed, 15 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/comedi/drivers/ni_mio_cs.c b/drivers/staging/comedi/drivers/ni_mio_cs.c
index 2d28a71..a9cd552 100644
--- a/drivers/staging/comedi/drivers/ni_mio_cs.c
+++ b/drivers/staging/comedi/drivers/ni_mio_cs.c
@@ -227,10 +227,23 @@ static uint16_t mio_cs_win_in(struct comedi_device *dev, int addr)
 
 #include "ni_mio_common.c"
 
+static struct pcmcia_device *cur_dev;
+
 static int ni_getboardtype(struct comedi_device *dev,
-			   struct pcmcia_device *link);
+			   struct pcmcia_device *link)
+{
+	int i;
 
-static struct pcmcia_device *cur_dev;
+	for (i = 0; i < n_ni_boards; i++) {
+		if (ni_boards[i].device_id == link->card_id)
+			return i;
+	}
+
+	dev_err(dev->class_dev,
+		"unknown board 0x%04x -- pretend it is a ", link->card_id);
+
+	return 0;
+}
 
 static int mio_cs_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 {
@@ -301,22 +314,6 @@ static int mio_cs_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 	return 0;
 }
 
-static int ni_getboardtype(struct comedi_device *dev,
-			   struct pcmcia_device *link)
-{
-	int i;
-
-	for (i = 0; i < n_ni_boards; i++) {
-		if (ni_boards[i].device_id == link->card_id)
-			return i;
-	}
-
-	dev_err(dev->class_dev,
-		"unknown board 0x%04x -- pretend it is a ", link->card_id);
-
-	return 0;
-}
-
 static void mio_cs_detach(struct comedi_device *dev)
 {
 	mio_common_detach(dev);
-- 
1.8.0.2

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/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