Only one of the boards supported by this driver has analog outputs.
For aesthetics, change the 'n_ao_chans' member of the boardinfo into
a bit-field flag 'has_ao'.
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>
struct das16cs_board {
const char *name;
int device_id;
struct das16cs_board {
const char *name;
int device_id;
};
static const struct das16cs_board das16cs_boards[] = {
{
.name = "PC-CARD DAS16/16-AO",
.device_id = 0x0039,
};
static const struct das16cs_board das16cs_boards[] = {
{
.name = "PC-CARD DAS16/16-AO",
.device_id = 0x0039,
}, {
.name = "PCM-DAS16s/16",
.device_id = 0x4009,
}, {
.name = "PCM-DAS16s/16",
.device_id = 0x4009,
}, {
.name = "PC-CARD DAS16/16",
.device_id = 0x0000, /* unknown */
}, {
.name = "PC-CARD DAS16/16",
.device_id = 0x0000, /* unknown */
s = &dev->subdevices[1];
/* analog output subdevice */
s = &dev->subdevices[1];
/* analog output subdevice */
- if (board->n_ao_chans) {
s->type = COMEDI_SUBD_AO;
s->subdev_flags = SDF_WRITABLE;
s->type = COMEDI_SUBD_AO;
s->subdev_flags = SDF_WRITABLE;
- s->n_chan = board->n_ao_chans;
s->maxdata = 0xffff;
s->range_table = &range_bipolar10;
s->insn_write = &das16cs_ao_insn_write;
s->maxdata = 0xffff;
s->range_table = &range_bipolar10;
s->insn_write = &das16cs_ao_insn_write;