staging: comedi: adl_pci9118: tidy up digital input subdevice init
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Thu, 4 Sep 2014 17:39:40 +0000 (10:39 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Sep 2014 20:54:07 +0000 (13:54 -0700)
For aesthetics, add some whitespace to the digital input subdevice init.

Remove the SDF_GROUND and SDF_COMMON subdev_flags. These flags only apply
to analog subdevices.

Remove the 'len_chanlist' init, this subdevice member is only used with
subdevices that support async commands.

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/adl_pci9118.c

index d7af6f74d3631e2ae50fb24986b2ab81f1bd44cf..f9598b0702a221906a8bcc68328fe0f2de951715 100644 (file)
@@ -1898,14 +1898,14 @@ static int pci9118_common_attach(struct comedi_device *dev, int disable_irq,
        s->insn_write = pci9118_insn_write_ao;
        s->insn_read = pci9118_insn_read_ao;
 
+       /* Digital Input subdevice */
        s = &dev->subdevices[2];
-       s->type = COMEDI_SUBD_DI;
-       s->subdev_flags = SDF_READABLE | SDF_GROUND | SDF_COMMON;
-       s->n_chan = 4;
-       s->maxdata = 1;
-       s->len_chanlist = 4;
-       s->range_table = &range_digital;
-       s->insn_bits = pci9118_insn_bits_di;
+       s->type         = COMEDI_SUBD_DI;
+       s->subdev_flags = SDF_READABLE;
+       s->n_chan       = 4;
+       s->maxdata      = 1;
+       s->range_table  = &range_digital;
+       s->insn_bits    = pci9118_insn_bits_di;
 
        /* Digital Output subdevice */
        s = &dev->subdevices[3];