Commit c5fcb7ca authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: aio_aio12_8: move comedi_lrange definition

For aesthetics, move the comedi_lrange definition used in this driver
to the follow the norm in comedi drivers and rename the variable.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ffe4a317
...@@ -76,6 +76,15 @@ ...@@ -76,6 +76,15 @@
#define AIO12_8_DAC_ENABLE_REG 0x18 #define AIO12_8_DAC_ENABLE_REG 0x18
#define AIO12_8_DAC_ENABLE_REF_ENA BIT(0) #define AIO12_8_DAC_ENABLE_REF_ENA BIT(0)
static const struct comedi_lrange aio_aio12_8_range = {
4, {
UNI_RANGE(5),
BIP_RANGE(5),
UNI_RANGE(10),
BIP_RANGE(10)
}
};
struct aio12_8_boardtype { struct aio12_8_boardtype {
const char *name; const char *name;
int ai_nchan; int ai_nchan;
...@@ -188,15 +197,6 @@ static int aio_aio12_8_counter_insn_config(struct comedi_device *dev, ...@@ -188,15 +197,6 @@ static int aio_aio12_8_counter_insn_config(struct comedi_device *dev,
return insn->n; return insn->n;
} }
static const struct comedi_lrange range_aio_aio12_8 = {
4, {
UNI_RANGE(5),
BIP_RANGE(5),
UNI_RANGE(10),
BIP_RANGE(10)
}
};
static int aio_aio12_8_attach(struct comedi_device *dev, static int aio_aio12_8_attach(struct comedi_device *dev,
struct comedi_devconfig *it) struct comedi_devconfig *it)
{ {
...@@ -224,7 +224,7 @@ static int aio_aio12_8_attach(struct comedi_device *dev, ...@@ -224,7 +224,7 @@ static int aio_aio12_8_attach(struct comedi_device *dev,
s->subdev_flags = SDF_READABLE | SDF_GROUND | SDF_DIFF; s->subdev_flags = SDF_READABLE | SDF_GROUND | SDF_DIFF;
s->n_chan = board->ai_nchan; s->n_chan = board->ai_nchan;
s->maxdata = 0x0fff; s->maxdata = 0x0fff;
s->range_table = &range_aio_aio12_8; s->range_table = &aio_aio12_8_range;
s->insn_read = aio_aio12_8_ai_read; s->insn_read = aio_aio12_8_ai_read;
} else { } else {
s->type = COMEDI_SUBD_UNUSED; s->type = COMEDI_SUBD_UNUSED;
...@@ -237,7 +237,7 @@ static int aio_aio12_8_attach(struct comedi_device *dev, ...@@ -237,7 +237,7 @@ static int aio_aio12_8_attach(struct comedi_device *dev,
s->subdev_flags = SDF_WRITABLE | SDF_GROUND | SDF_DIFF; s->subdev_flags = SDF_WRITABLE | SDF_GROUND | SDF_DIFF;
s->n_chan = 4; s->n_chan = 4;
s->maxdata = 0x0fff; s->maxdata = 0x0fff;
s->range_table = &range_aio_aio12_8; s->range_table = &aio_aio12_8_range;
s->insn_write = aio_aio12_8_ao_insn_write; s->insn_write = aio_aio12_8_ao_insn_write;
ret = comedi_alloc_subdev_readback(s); ret = comedi_alloc_subdev_readback(s);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment