Commit 33ae8a5e authored by Chase Southwood's avatar Chase Southwood Committed by Greg Kroah-Hartman

staging: comedi: addi_apci_1564: board has 32 digital outputs

This board always has 32 digital outputs.  Remove the test when
initializing the subdevice.

Also, since this board is the only one supported by this driver, remove
the boardinfo about the digital outputs and just use the data directly in
the subdevice init.
Signed-off-by: default avatarChase Southwood <chase.southwood@gmail.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Reviewed-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c8193385
...@@ -17,9 +17,6 @@ static const struct addi_board apci1564_boardtypes[] = { ...@@ -17,9 +17,6 @@ static const struct addi_board apci1564_boardtypes[] = {
.i_Timer = 1, .i_Timer = 1,
.interrupt = apci1564_interrupt, .interrupt = apci1564_interrupt,
.reset = apci1564_reset, .reset = apci1564_reset,
.do_config = apci1564_do_config,
.do_bits = apci1564_do_insn_bits,
.do_read = apci1564_do_read,
.timer_config = apci1564_timer_config, .timer_config = apci1564_timer_config,
.timer_write = apci1564_timer_write, .timer_write = apci1564_timer_write,
.timer_read = apci1564_timer_read, .timer_read = apci1564_timer_read,
...@@ -98,23 +95,15 @@ static int apci1564_auto_attach(struct comedi_device *dev, ...@@ -98,23 +95,15 @@ static int apci1564_auto_attach(struct comedi_device *dev,
/* Allocate and Initialise DO Subdevice Structures */ /* Allocate and Initialise DO Subdevice Structures */
s = &dev->subdevices[3]; s = &dev->subdevices[3];
if (this_board->i_NbrDoChannel) {
s->type = COMEDI_SUBD_DO; s->type = COMEDI_SUBD_DO;
s->subdev_flags = s->subdev_flags = SDF_WRITEABLE;
SDF_READABLE | SDF_WRITEABLE | SDF_GROUND | SDF_COMMON; s->n_chan = 32;
s->n_chan = this_board->i_NbrDoChannel; s->maxdata = 0xffffffff;
s->maxdata = this_board->i_DoMaxdata; s->len_chanlist = 32;
s->len_chanlist = this_board->i_NbrDoChannel;
s->range_table = &range_digital; s->range_table = &range_digital;
s->insn_config = apci1564_do_config;
/* insn_config - for digital output memory */ s->insn_bits = apci1564_do_insn_bits;
s->insn_config = this_board->do_config; s->insn_read = apci1564_do_read;
s->insn_write = this_board->do_write;
s->insn_bits = this_board->do_bits;
s->insn_read = this_board->do_read;
} else {
s->type = COMEDI_SUBD_UNUSED;
}
/* Allocate and Initialise Timer Subdevice Structures */ /* Allocate and Initialise Timer Subdevice Structures */
s = &dev->subdevices[4]; s = &dev->subdevices[4];
......
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