OSDN Git Service

staging: comedi: ni_mio_cs: remove last forward declaration
authorH Hartley Sweeten <hartleys@visionengravers.com>
Sat, 26 Jan 2013 00:35:19 +0000 (17:35 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Jan 2013 04:08:23 +0000 (23:08 -0500)
Move the ni_getboardtype() function to remove the last forward
declaration in this file.

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

index 2d28a71..a9cd552 100644 (file)
@@ -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);