summaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi
diff options
context:
space:
mode:
authorH Hartley Sweeten2013-01-25 23:01:46 +0100
committerGreg Kroah-Hartman2013-01-30 05:06:41 +0100
commite23fe9a1bf80eee77d4cc97504bcec0c40ed973d (patch)
tree121e335820e105ae4c587e14bcf3dcd9fa57b119 /drivers/staging/comedi
parentstaging: comedi: quatech_daqp_cs: remove #define pr_fmt (diff)
downloadkernel-qcow2-linux-e23fe9a1bf80eee77d4cc97504bcec0c40ed973d.tar.gz
kernel-qcow2-linux-e23fe9a1bf80eee77d4cc97504bcec0c40ed973d.tar.xz
kernel-qcow2-linux-e23fe9a1bf80eee77d4cc97504bcec0c40ed973d.zip
staging: comedi: quatech_daqp_cs: cleanup the comedi_lrange tables
For aesthetic reasons, cleanup the whitespace of the range_daqp_ai table. Remove the range_daqp_ao table and use the comedi core provided range table for bipolar 5V (range_bipolar5). Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi')
-rw-r--r--drivers/staging/comedi/drivers/quatech_daqp_cs.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/drivers/staging/comedi/drivers/quatech_daqp_cs.c b/drivers/staging/comedi/drivers/quatech_daqp_cs.c
index a74581f60200..185632e70b97 100644
--- a/drivers/staging/comedi/drivers/quatech_daqp_cs.c
+++ b/drivers/staging/comedi/drivers/quatech_daqp_cs.c
@@ -163,21 +163,15 @@ static struct local_info_t *dev_table[MAX_DEV] = { NULL, /* ... */ };
#define DAQP_AUX_FIFO_NEARFULL 0x02
#define DAQP_AUX_FIFO_EMPTY 0x01
-/* These range structures tell COMEDI how the sample values map to
- * voltages. The A/D converter has four .ranges = +/- 10V through
- * +/- 1.25V, and the D/A converter has only .one = +/- 5V.
- */
-
-static const struct comedi_lrange range_daqp_ai = { 4, {
- BIP_RANGE(10),
- BIP_RANGE(5),
- BIP_RANGE(2.5),
- BIP_RANGE(1.25)
- }
+static const struct comedi_lrange range_daqp_ai = {
+ 4, {
+ BIP_RANGE(10),
+ BIP_RANGE(5),
+ BIP_RANGE(2.5),
+ BIP_RANGE(1.25)
+ }
};
-static const struct comedi_lrange range_daqp_ao = { 1, {BIP_RANGE(5)} };
-
/* Cancel a running acquisition */
static int daqp_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
@@ -797,7 +791,7 @@ static int daqp_attach(struct comedi_device *dev, struct comedi_devconfig *it)
s->n_chan = 2;
s->len_chanlist = 1;
s->maxdata = 0x0fff;
- s->range_table = &range_daqp_ao;
+ s->range_table = &range_bipolar5;
s->insn_write = daqp_ao_insn_write;
s = &dev->subdevices[2];