Staging: comedi: Add spaces after commas
[safe/jmp/linux-2.6] / drivers / staging / comedi / drivers / cb_pcimdda.c
index eb583bf..1afedd8 100644 (file)
@@ -97,7 +97,7 @@ Configuration Options:
  * This is straight from skel.c -- I did this in case this source file
  * will someday support more than 1 board...
  */
-typedef struct board_struct {
+struct board_struct {
        const char *name;
        unsigned short device_id;
        int ao_chans;
@@ -108,7 +108,7 @@ typedef struct board_struct {
        int regs_badrindex;     /* IO Region for the control, analog output,
                                   and DIO registers */
        int reg_sz;             /* number of bytes of registers in io region */
-} board;
+};
 
 enum DIO_METHODS {
        DIO_NONE = 0,
@@ -116,7 +116,7 @@ enum DIO_METHODS {
        DIO_INTERNAL            /* unimplemented */
 };
 
-static const board boards[] = {
+static const struct board_struct boards[] = {
        {
              name:     "cb_pcimdda06-16",
              device_id:PCI_ID_PCIM_DDA06_16,
@@ -133,10 +133,10 @@ static const board boards[] = {
 /*
  * Useful for shorthand access to the particular board structure
  */
-#define thisboard    ((const board *)dev->board_ptr)
+#define thisboard    ((const struct board_struct *)dev->board_ptr)
 
 /* Number of boards in boards[] */
-#define N_BOARDS       (sizeof(boards) / sizeof(board))
+#define N_BOARDS       (sizeof(boards) / sizeof(struct board_struct))
 #define REG_SZ (thisboard->reg_sz)
 #define REGS_BADRINDEX (thisboard->regs_badrindex)
 
@@ -155,7 +155,7 @@ MODULE_DEVICE_TABLE(pci, pci_table);
 /* this structure is for data unique to this hardware driver.  If
    several hardware drivers keep similar information in this structure,
    feel free to suggest moving the variable to the struct comedi_device struct.  */
-typedef struct {
+struct board_private_struct {
        unsigned long registers;        /* set by probe */
        unsigned long dio_registers;
        char attached_to_8255;  /* boolean */
@@ -167,23 +167,23 @@ typedef struct {
        /* Used for AO readback */
        unsigned int ao_readback[MAX_AO_READBACK_CHANNELS];
 
-} private;
+};
 
 /*
  * most drivers define the following macro to make it easy to
  * access the private structure.
  */
-#define devpriv ((private *)dev->private)
+#define devpriv ((struct board_private_struct *)dev->private)
 
 /*
- * The comedi_driver structure tells the Comedi core module
+ * The struct comedi_driver structure tells the Comedi core module
  * which functions to call to configure/deconfigure (attach/detach)
  * the board, and also about the kernel module that contains
  * the device code.
  */
-static int attach(struct comedi_device * dev, comedi_devconfig * it);
-static int detach(struct comedi_device * dev);
-static comedi_driver cb_pcimdda_driver = {
+static int attach(struct comedi_device *dev, struct comedi_devconfig *it);
+static int detach(struct comedi_device *dev);
+static struct comedi_driver cb_pcimdda_driver = {
       driver_name:"cb_pcimdda",
       module:THIS_MODULE,
       attach:attach,
@@ -197,10 +197,10 @@ MODULE_DESCRIPTION("Comedi low-level driver for the Computerboards PCIM-DDA "
 MODULE_LICENSE("GPL");
 COMEDI_PCI_INITCLEANUP_NOMODULE(cb_pcimdda_driver, pci_table);
 
-static int ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
-       comedi_insn * insn, unsigned int * data);
-static int ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
-       comedi_insn * insn, unsigned int * data);
+static int ao_winsn(struct comedi_device *dev, struct comedi_subdevice *s,
+       struct comedi_insn *insn, unsigned int *data);
+static int ao_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
+       struct comedi_insn *insn, unsigned int *data);
 
 /*---------------------------------------------------------------------------
   HELPER FUNCTION DECLARATIONS
@@ -226,7 +226,7 @@ static inline unsigned int figure_out_maxdata(int bits)
  *
  *  Otherwise, returns a -errno on error
  */
-static int probe(struct comedi_device * dev, const comedi_devconfig * it);
+static int probe(struct comedi_device *dev, const struct comedi_devconfig *it);
 
 /*---------------------------------------------------------------------------
   FUNCTION DEFINITIONS
@@ -238,9 +238,9 @@ static int probe(struct comedi_device * dev, const comedi_devconfig * it);
  * in the driver structure, dev->board_ptr contains that
  * address.
  */
-static int attach(struct comedi_device * dev, comedi_devconfig * it)
+static int attach(struct comedi_device *dev, struct comedi_devconfig *it)
 {
-       comedi_subdevice *s;
+       struct comedi_subdevice *s;
        int err;
 
 /*
@@ -249,7 +249,7 @@ static int attach(struct comedi_device * dev, comedi_devconfig * it)
  * if this function fails (returns negative) then the private area is
  * kfree'd by comedi
  */
-       if (alloc_private(dev, sizeof(private)) < 0)
+       if (alloc_private(dev, sizeof(struct board_private_struct)) < 0)
                return -ENOMEM;
 
 /*
@@ -326,7 +326,7 @@ static int attach(struct comedi_device * dev, comedi_devconfig * it)
  * allocated by _attach().  dev->private and dev->subdevices are
  * deallocated automatically by the core.
  */
-static int detach(struct comedi_device * dev)
+static int detach(struct comedi_device *dev)
 {
        if (devpriv) {
 
@@ -352,8 +352,8 @@ static int detach(struct comedi_device * dev)
        return 0;
 }
 
-static int ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
-       comedi_insn * insn, unsigned int * data)
+static int ao_winsn(struct comedi_device *dev, struct comedi_subdevice *s,
+       struct comedi_insn *insn, unsigned int *data)
 {
        int i;
        int chan = CR_CHAN(insn->chanspec);
@@ -391,8 +391,8 @@ static int ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
    all AO channels update simultaneously.  This is useful for some control
    applications, I would imagine.
 */
-static int ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
-       comedi_insn * insn, unsigned int * data)
+static int ao_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
+       struct comedi_insn *insn, unsigned int *data)
 {
        int i;
        int chan = CR_CHAN(insn->chanspec);
@@ -425,7 +425,7 @@ static int ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
  *
  *  Otherwise, returns a -errno on error
  */
-static int probe(struct comedi_device * dev, const comedi_devconfig * it)
+static int probe(struct comedi_device *dev, const struct comedi_devconfig *it)
 {
        struct pci_dev *pcidev;
        int index;
@@ -434,16 +434,16 @@ static int probe(struct comedi_device * dev, const comedi_devconfig * it)
        for (pcidev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, NULL);
                pcidev != NULL;
                pcidev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pcidev)) {
-               // is it not a computer boards card?
+               /*  is it not a computer boards card? */
                if (pcidev->vendor != PCI_VENDOR_ID_COMPUTERBOARDS)
                        continue;
-               // loop through cards supported by this driver
+               /*  loop through cards supported by this driver */
                for (index = 0; index < N_BOARDS; index++) {
                        if (boards[index].device_id != pcidev->device)
                                continue;
-                       // was a particular bus/slot requested?
+                       /*  was a particular bus/slot requested? */
                        if (it->options[0] || it->options[1]) {
-                               // are we on the wrong bus/slot?
+                               /*  are we on the wrong bus/slot? */
                                if (pcidev->bus->number != it->options[0] ||
                                        PCI_SLOT(pcidev->devfn) !=
                                        it->options[1]) {