summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2015-10-14 00:47:53 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-10-17 06:20:10 (GMT)
commite56aaa24a0347d6e0f3be83eb31252855cadba93 (patch)
tree4fbad244d95f50b7ea212fea8dc1f1d9ac7dfc4e /drivers
parentfe970e4d2d75497a7fed75cea0acd7150e92ed92 (diff)
downloadlinux-e56aaa24a0347d6e0f3be83eb31252855cadba93.tar.xz
staging: comedi: cb_pcidas: tidy up dac08 calibration subdevice
For aesthetics, add some whitespace to the subdevice init. It's not possible to actually read from the dac08. 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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/comedi/drivers/cb_pcidas.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/staging/comedi/drivers/cb_pcidas.c b/drivers/staging/comedi/drivers/cb_pcidas.c
index fc972e5..b5c7dc3 100644
--- a/drivers/staging/comedi/drivers/cb_pcidas.c
+++ b/drivers/staging/comedi/drivers/cb_pcidas.c
@@ -1415,14 +1415,14 @@ static int cb_pcidas_auto_attach(struct comedi_device *dev,
s->readback[i] = s->maxdata / 2;
}
- /* dac08 caldac */
+ /* Calibration subdevice - dac08 caldac */
s = &dev->subdevices[6];
if (board->has_dac08) {
- s->type = COMEDI_SUBD_CALIB;
- s->subdev_flags = SDF_READABLE | SDF_WRITABLE | SDF_INTERNAL;
- s->n_chan = 1;
- s->maxdata = 0xff;
- s->insn_write = cb_pcidas_dac08_insn_write;
+ s->type = COMEDI_SUBD_CALIB;
+ s->subdev_flags = SDF_WRITABLE | SDF_INTERNAL;
+ s->n_chan = 1;
+ s->maxdata = 0xff;
+ s->insn_write = cb_pcidas_dac08_insn_write;
ret = comedi_alloc_subdev_readback(s);
if (ret)
@@ -1433,7 +1433,7 @@ static int cb_pcidas_auto_attach(struct comedi_device *dev,
s->readback[i] = s->maxdata / 2;
}
} else {
- s->type = COMEDI_SUBD_UNUSED;
+ s->type = COMEDI_SUBD_UNUSED;
}
/* make sure mailbox 4 is empty */