]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
staging: comedi: ni_65xx: tidy up the subdevice initialization
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 14 Jul 2014 19:07:00 +0000 (12:07 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Jul 2014 20:22:50 +0000 (13:22 -0700)
For aesthetics, add some whitespace to the subdevice init.

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

index 5218e67fb21bf4c235eb9d2b275d5473700e7928..07d59493ed7bcfd370646dbef71ce46b5f626254 100644 (file)
@@ -618,44 +618,44 @@ static int ni_65xx_auto_attach(struct comedi_device *dev,
 
        s = &dev->subdevices[0];
        if (board->num_di_ports) {
-               s->type = COMEDI_SUBD_DI;
-               s->subdev_flags = SDF_READABLE;
-               s->n_chan = NI_65XX_PORT_TO_CHAN(board->num_di_ports);
-               s->range_table = &range_digital;
-               s->maxdata = 1;
-               s->insn_config = ni_65xx_dio_insn_config;
-               s->insn_bits = ni_65xx_dio_insn_bits;
+               s->type         = COMEDI_SUBD_DI;
+               s->subdev_flags = SDF_READABLE;
+               s->n_chan       = NI_65XX_PORT_TO_CHAN(board->num_di_ports);
+               s->maxdata      = 1;
+               s->range_table  = &range_digital;
+               s->insn_bits    = ni_65xx_dio_insn_bits;
+               s->insn_config  = ni_65xx_dio_insn_config;
 
                /* the input ports always start at port 0 */
                s->private = (void *)0;
        } else {
-               s->type = COMEDI_SUBD_UNUSED;
+               s->type         = COMEDI_SUBD_UNUSED;
        }
 
        s = &dev->subdevices[1];
        if (board->num_do_ports) {
-               s->type = COMEDI_SUBD_DO;
-               s->subdev_flags = SDF_READABLE | SDF_WRITABLE;
-               s->n_chan = NI_65XX_PORT_TO_CHAN(board->num_do_ports);
-               s->range_table = &range_digital;
-               s->maxdata = 1;
-               s->insn_bits = ni_65xx_dio_insn_bits;
+               s->type         = COMEDI_SUBD_DO;
+               s->subdev_flags = SDF_WRITABLE;
+               s->n_chan       = NI_65XX_PORT_TO_CHAN(board->num_do_ports);
+               s->maxdata      = 1;
+               s->range_table  = &range_digital;
+               s->insn_bits    = ni_65xx_dio_insn_bits;
 
                /* the output ports always start after the input ports */
                s->private = (void *)(unsigned long)board->num_di_ports;
        } else {
-               s->type = COMEDI_SUBD_UNUSED;
+               s->type         = COMEDI_SUBD_UNUSED;
        }
 
        s = &dev->subdevices[2];
        if (board->num_dio_ports) {
-               s->type = COMEDI_SUBD_DIO;
-               s->subdev_flags = SDF_READABLE | SDF_WRITABLE;
-               s->n_chan = NI_65XX_PORT_TO_CHAN(board->num_dio_ports);
-               s->range_table = &range_digital;
-               s->maxdata = 1;
-               s->insn_config = ni_65xx_dio_insn_config;
-               s->insn_bits = ni_65xx_dio_insn_bits;
+               s->type         = COMEDI_SUBD_DIO;
+               s->subdev_flags = SDF_READABLE | SDF_WRITABLE;
+               s->n_chan       = NI_65XX_PORT_TO_CHAN(board->num_dio_ports);
+               s->maxdata      = 1;
+               s->range_table  = &range_digital;
+               s->insn_bits    = ni_65xx_dio_insn_bits;
+               s->insn_config  = ni_65xx_dio_insn_config;
 
                /* the input/output ports always start at port 0 */
                s->private = (void *)0;
@@ -666,7 +666,7 @@ static int ni_65xx_auto_attach(struct comedi_device *dev,
                               devpriv->mmio + NI_65XX_IO_SEL_REG(i));
                }
        } else {
-               s->type = COMEDI_SUBD_UNUSED;
+               s->type         = COMEDI_SUBD_UNUSED;
        }
 
        s = &dev->subdevices[3];