staging: comedi: cb_pcidas: tidy up 8800 caldac calibration subdevice
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 14 Oct 2015 00:47:55 +0000 (17:47 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 17 Oct 2015 06:20:10 +0000 (23:20 -0700)
For aesthetics, add some whitespace to the subdevice init.

It's not possible to actually read from the caldac. For convienence
the subdevice readback provided by the core is used to return the
last value written to the subdevice. Remove the SDF_READABLE flag
from the subdev_flags.

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

index 04d12bf1f6cd2e4fb0faf0f3c7c4677bd4a686e4..f34a615df841d9cd89dc4efb0f3f6f65f2076486 100644 (file)
@@ -1365,13 +1365,13 @@ static int cb_pcidas_auto_attach(struct comedi_device *dev,
        s->maxdata = 0xff;
        s->insn_read = eeprom_read_insn;
 
-       /*  8800 caldac */
+       /* Calibration subdevice - 8800 caldac */
        s = &dev->subdevices[4];
-       s->type = COMEDI_SUBD_CALIB;
-       s->subdev_flags = SDF_READABLE | SDF_WRITABLE | SDF_INTERNAL;
-       s->n_chan = 8;
-       s->maxdata = 0xff;
-       s->insn_write = cb_pcidas_caldac_insn_write;
+       s->type         = COMEDI_SUBD_CALIB;
+       s->subdev_flags = SDF_WRITABLE | SDF_INTERNAL;
+       s->n_chan       = 8;
+       s->maxdata      = 0xff;
+       s->insn_write   = cb_pcidas_caldac_insn_write;
 
        ret = comedi_alloc_subdev_readback(s);
        if (ret)