staging: comedi: mf6x4: tidy up subdevice init
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 6 Oct 2015 18:11:18 +0000 (11:11 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Oct 2015 05:55:31 +0000 (22:55 -0700)
For aesthetics, add some whitespace to the subdevice initialization.

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

index b805f15150da3a131de485c1afbf403f54b6e01f..fbdf181d8ccccc228c131346a9e9ec9dc403d11b 100644 (file)
@@ -230,45 +230,45 @@ static int mf6x4_auto_attach(struct comedi_device *dev, unsigned long context)
        if (ret)
                return ret;
 
-       /* ADC */
+       /* Analog Input subdevice */
        s = &dev->subdevices[0];
-       s->type = COMEDI_SUBD_AI;
-       s->subdev_flags = SDF_READABLE | SDF_GROUND;
-       s->n_chan = 8;
-       s->maxdata = 0x3fff; /* 14 bits ADC */
-       s->range_table = &range_bipolar10;
-       s->insn_read = mf6x4_ai_insn_read;
-
-       /* DAC */
+       s->type         = COMEDI_SUBD_AI;
+       s->subdev_flags = SDF_READABLE | SDF_GROUND;
+       s->n_chan       = 8;
+       s->maxdata      = 0x3fff;
+       s->range_table  = &range_bipolar10;
+       s->insn_read    = mf6x4_ai_insn_read;
+
+       /* Analog Output subdevice */
        s = &dev->subdevices[1];
-       s->type = COMEDI_SUBD_AO;
-       s->subdev_flags = SDF_WRITABLE;
-       s->n_chan = 8;
-       s->maxdata = 0x3fff; /* 14 bits DAC */
-       s->range_table = &range_bipolar10;
-       s->insn_write = mf6x4_ao_insn_write;
+       s->type         = COMEDI_SUBD_AO;
+       s->subdev_flags = SDF_WRITABLE;
+       s->n_chan       = 8;
+       s->maxdata      = 0x3fff;
+       s->range_table  = &range_bipolar10;
+       s->insn_write   = mf6x4_ao_insn_write;
 
        ret = comedi_alloc_subdev_readback(s);
        if (ret)
                return ret;
 
-       /* DIN */
+       /* Digital Input subdevice */
        s = &dev->subdevices[2];
-       s->type = COMEDI_SUBD_DI;
-       s->subdev_flags = SDF_READABLE;
-       s->n_chan = 8;
-       s->maxdata = 1;
-       s->range_table = &range_digital;
-       s->insn_bits = mf6x4_di_insn_bits;
-
-       /* DOUT */
+       s->type         = COMEDI_SUBD_DI;
+       s->subdev_flags = SDF_READABLE;
+       s->n_chan       = 8;
+       s->maxdata      = 1;
+       s->range_table  = &range_digital;
+       s->insn_bits    = mf6x4_di_insn_bits;
+
+       /* Digital Output subdevice */
        s = &dev->subdevices[3];
-       s->type = COMEDI_SUBD_DO;
-       s->subdev_flags = SDF_WRITABLE;
-       s->n_chan = 8;
-       s->maxdata = 1;
-       s->range_table = &range_digital;
-       s->insn_bits = mf6x4_do_insn_bits;
+       s->type         = COMEDI_SUBD_DO;
+       s->subdev_flags = SDF_WRITABLE;
+       s->n_chan       = 8;
+       s->maxdata      = 1;
+       s->range_table  = &range_digital;
+       s->insn_bits    = mf6x4_do_insn_bits;
 
        return 0;
 }