Merge branch 'for-2.6.31' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6
[pandora-kernel.git] / drivers / staging / comedi / drivers / adl_pci7296.c
index 9c9d3f4..d2f23a8 100644 (file)
@@ -39,7 +39,7 @@ Configuration Options:
 
 #include "comedi_pci.h"
 #include "8255.h"
-// #include "8253.h"
+/* #include "8253.h" */
 
 #define PORT1A 0
 #define PORT2A 4
@@ -56,26 +56,27 @@ static DEFINE_PCI_DEVICE_TABLE(adl_pci7296_pci_table) = {
 
 MODULE_DEVICE_TABLE(pci, adl_pci7296_pci_table);
 
-typedef struct {
+struct adl_pci7296_private {
        int data;
        struct pci_dev *pci_dev;
-} adl_pci7296_private;
+};
+
 
-#define devpriv ((adl_pci7296_private *)dev->private)
+#define devpriv ((struct adl_pci7296_private *)dev->private)
 
-static int adl_pci7296_attach(struct comedi_device * dev, comedi_devconfig * it);
-static int adl_pci7296_detach(struct comedi_device * dev);
-static comedi_driver driver_adl_pci7296 = {
-      driver_name:"adl_pci7296",
-      module:THIS_MODULE,
-      attach:adl_pci7296_attach,
-      detach:adl_pci7296_detach,
+static int adl_pci7296_attach(struct comedi_device *dev, struct comedi_devconfig *it);
+static int adl_pci7296_detach(struct comedi_device *dev);
+static struct comedi_driver driver_adl_pci7296 = {
+       .driver_name = "adl_pci7296",
+       .module = THIS_MODULE,
+       .attach = adl_pci7296_attach,
+       .detach = adl_pci7296_detach,
 };
 
-static int adl_pci7296_attach(struct comedi_device * dev, comedi_devconfig * it)
+static int adl_pci7296_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 {
        struct pci_dev *pcidev;
-       comedi_subdevice *s;
+       struct comedi_subdevice *s;
        int bus, slot;
        int ret;
 
@@ -86,7 +87,7 @@ static int adl_pci7296_attach(struct comedi_device * dev, comedi_devconfig * it)
        bus = it->options[0];
        slot = it->options[1];
 
-       if (alloc_private(dev, sizeof(adl_pci7296_private)) < 0)
+       if (alloc_private(dev, sizeof(struct adl_pci7296_private)) < 0)
                return -ENOMEM;
 
        if (alloc_subdevices(dev, 4) < 0)
@@ -114,7 +115,7 @@ static int adl_pci7296_attach(struct comedi_device * dev, comedi_devconfig * it)
                        dev->iobase = pci_resource_start(pcidev, 2);
                        printk("comedi: base addr %4lx\n", dev->iobase);
 
-                       // four 8255 digital io subdevices
+                       /*  four 8255 digital io subdevices */
                        s = dev->subdevices + 0;
                        subdev_8255_init(dev, s, NULL,
                                (unsigned long)(dev->iobase));
@@ -148,7 +149,7 @@ static int adl_pci7296_attach(struct comedi_device * dev, comedi_devconfig * it)
        return -EIO;
 }
 
-static int adl_pci7296_detach(struct comedi_device * dev)
+static int adl_pci7296_detach(struct comedi_device *dev)
 {
        printk("comedi%d: pci7432: remove\n", dev->minor);
 
@@ -158,7 +159,7 @@ static int adl_pci7296_detach(struct comedi_device * dev)
                }
                pci_dev_put(devpriv->pci_dev);
        }
-       // detach four 8255 digital io subdevices
+       /*  detach four 8255 digital io subdevices */
        if (dev->subdevices) {
                subdev_8255_cleanup(dev, dev->subdevices + 0);
                subdev_8255_cleanup(dev, dev->subdevices + 1);