]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: comedi: ni_65xx: move ni_65xx_driver
authorIan Abbott <abbotti@mev.co.uk>
Fri, 14 Sep 2012 16:34:05 +0000 (17:34 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Sep 2012 12:09:04 +0000 (05:09 -0700)
Move the `struct comedi_driver ni_65xx_driver` variable further down the
function to be closer to the `module_comedi_pci_driver()` module call
and to avoid having to forward declare `ni_65xx_attach()` and
`ni_65xx_detach()`.

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

index 529f4d527833f63471afe1fd9da4ee4ef1c96e77..6a5e84ef15e1543e12ded61b32b84cb619afd885 100644 (file)
@@ -109,18 +109,7 @@ static inline unsigned Filter_Enable(unsigned port)
 #define OverflowIntEnable              0x02
 #define EdgeIntEnable                  0x01
 
-static int ni_65xx_attach(struct comedi_device *dev,
-                         struct comedi_devconfig *it);
-static void ni_65xx_detach(struct comedi_device *dev);
-static struct comedi_driver ni_65xx_driver = {
-       .driver_name = "ni_65xx",
-       .module = THIS_MODULE,
-       .attach = ni_65xx_attach,
-       .detach = ni_65xx_detach,
-};
-
 struct ni_65xx_board {
-
        int dev_id;
        const char *name;
        unsigned num_dio_ports;
@@ -822,6 +811,13 @@ static int ni_65xx_find_device(struct comedi_device *dev, int bus, int slot)
        return -EIO;
 }
 
+static struct comedi_driver ni_65xx_driver = {
+       .driver_name = "ni_65xx",
+       .module = THIS_MODULE,
+       .attach = ni_65xx_attach,
+       .detach = ni_65xx_detach,
+};
+
 static int __devinit ni_65xx_pci_probe(struct pci_dev *dev,
                                       const struct pci_device_id *ent)
 {