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

staging: comedi: das1800: remove 'do_n_chan' boardinfo

The "hc" type boards have 8 digtial outputs. All other board
types have 4.

Remove the 'do_n_chan' member of the boardinfo and use the
'id' member to determine the subdevice 'n_chan'.
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 dad1e30f
...@@ -228,7 +228,6 @@ struct das1800_board { ...@@ -228,7 +228,6 @@ struct das1800_board {
unsigned char id; unsigned char id;
int ai_speed; /* max conversion period in nanoseconds */ int ai_speed; /* max conversion period in nanoseconds */
int qram_len; /* length of card's channel / gain queue */ int qram_len; /* length of card's channel / gain queue */
int do_n_chan; /* number of digital output channels */
int ao_ability; /* 0 == no analog out, 1 == basic analog out, 2 == waveform analog out */ int ao_ability; /* 0 == no analog out, 1 == basic analog out, 2 == waveform analog out */
int ao_n_chan; /* number of analog out channels */ int ao_n_chan; /* number of analog out channels */
const struct comedi_lrange *range_ai; /* available input ranges */ const struct comedi_lrange *range_ai; /* available input ranges */
...@@ -244,7 +243,6 @@ static const struct das1800_board das1800_boards[] = { ...@@ -244,7 +243,6 @@ static const struct das1800_board das1800_boards[] = {
.id = DAS1800_ID_ST, .id = DAS1800_ID_ST,
.ai_speed = 6250, .ai_speed = 6250,
.qram_len = 256, .qram_len = 256,
.do_n_chan = 4,
.ao_ability = 0, .ao_ability = 0,
.ao_n_chan = 0, .ao_n_chan = 0,
.range_ai = &range_ai_das1801, .range_ai = &range_ai_das1801,
...@@ -254,7 +252,6 @@ static const struct das1800_board das1800_boards[] = { ...@@ -254,7 +252,6 @@ static const struct das1800_board das1800_boards[] = {
.id = DAS1800_ID_ST_DA, .id = DAS1800_ID_ST_DA,
.ai_speed = 6250, .ai_speed = 6250,
.qram_len = 256, .qram_len = 256,
.do_n_chan = 4,
.ao_ability = 1, .ao_ability = 1,
.ao_n_chan = 4, .ao_n_chan = 4,
.range_ai = &range_ai_das1801, .range_ai = &range_ai_das1801,
...@@ -264,7 +261,6 @@ static const struct das1800_board das1800_boards[] = { ...@@ -264,7 +261,6 @@ static const struct das1800_board das1800_boards[] = {
.id = DAS1800_ID_ST, .id = DAS1800_ID_ST,
.ai_speed = 6250, .ai_speed = 6250,
.qram_len = 256, .qram_len = 256,
.do_n_chan = 4,
.ao_ability = 0, .ao_ability = 0,
.ao_n_chan = 0, .ao_n_chan = 0,
.range_ai = &range_ai_das1802, .range_ai = &range_ai_das1802,
...@@ -274,7 +270,6 @@ static const struct das1800_board das1800_boards[] = { ...@@ -274,7 +270,6 @@ static const struct das1800_board das1800_boards[] = {
.id = DAS1800_ID_ST_DA, .id = DAS1800_ID_ST_DA,
.ai_speed = 6250, .ai_speed = 6250,
.qram_len = 256, .qram_len = 256,
.do_n_chan = 4,
.ao_ability = 1, .ao_ability = 1,
.ao_n_chan = 4, .ao_n_chan = 4,
.range_ai = &range_ai_das1802, .range_ai = &range_ai_das1802,
...@@ -284,7 +279,6 @@ static const struct das1800_board das1800_boards[] = { ...@@ -284,7 +279,6 @@ static const struct das1800_board das1800_boards[] = {
.id = DAS1800_ID_HR, .id = DAS1800_ID_HR,
.ai_speed = 20000, .ai_speed = 20000,
.qram_len = 256, .qram_len = 256,
.do_n_chan = 4,
.ao_ability = 0, .ao_ability = 0,
.ao_n_chan = 0, .ao_n_chan = 0,
.range_ai = &range_ai_das1802, .range_ai = &range_ai_das1802,
...@@ -294,7 +288,6 @@ static const struct das1800_board das1800_boards[] = { ...@@ -294,7 +288,6 @@ static const struct das1800_board das1800_boards[] = {
.id = DAS1800_ID_HR_DA, .id = DAS1800_ID_HR_DA,
.ai_speed = 20000, .ai_speed = 20000,
.qram_len = 256, .qram_len = 256,
.do_n_chan = 4,
.ao_ability = 1, .ao_ability = 1,
.ao_n_chan = 2, .ao_n_chan = 2,
.range_ai = &range_ai_das1802, .range_ai = &range_ai_das1802,
...@@ -304,7 +297,6 @@ static const struct das1800_board das1800_boards[] = { ...@@ -304,7 +297,6 @@ static const struct das1800_board das1800_boards[] = {
.id = DAS1800_ID_AO, .id = DAS1800_ID_AO,
.ai_speed = 6250, .ai_speed = 6250,
.qram_len = 256, .qram_len = 256,
.do_n_chan = 4,
.ao_ability = 2, .ao_ability = 2,
.ao_n_chan = 2, .ao_n_chan = 2,
.range_ai = &range_ai_das1801, .range_ai = &range_ai_das1801,
...@@ -314,7 +306,6 @@ static const struct das1800_board das1800_boards[] = { ...@@ -314,7 +306,6 @@ static const struct das1800_board das1800_boards[] = {
.id = DAS1800_ID_AO, .id = DAS1800_ID_AO,
.ai_speed = 6250, .ai_speed = 6250,
.qram_len = 256, .qram_len = 256,
.do_n_chan = 4,
.ao_ability = 2, .ao_ability = 2,
.ao_n_chan = 2, .ao_n_chan = 2,
.range_ai = &range_ai_das1802, .range_ai = &range_ai_das1802,
...@@ -324,7 +315,6 @@ static const struct das1800_board das1800_boards[] = { ...@@ -324,7 +315,6 @@ static const struct das1800_board das1800_boards[] = {
.id = DAS1800_ID_ST, .id = DAS1800_ID_ST,
.ai_speed = 3000, .ai_speed = 3000,
.qram_len = 256, .qram_len = 256,
.do_n_chan = 4,
.ao_ability = 0, .ao_ability = 0,
.ao_n_chan = 0, .ao_n_chan = 0,
.range_ai = &range_ai_das1801, .range_ai = &range_ai_das1801,
...@@ -334,7 +324,6 @@ static const struct das1800_board das1800_boards[] = { ...@@ -334,7 +324,6 @@ static const struct das1800_board das1800_boards[] = {
.id = DAS1800_ID_ST_DA, .id = DAS1800_ID_ST_DA,
.ai_speed = 3000, .ai_speed = 3000,
.qram_len = 256, .qram_len = 256,
.do_n_chan = 4,
.ao_ability = 1, .ao_ability = 1,
.ao_n_chan = 4, .ao_n_chan = 4,
.range_ai = &range_ai_das1801, .range_ai = &range_ai_das1801,
...@@ -344,7 +333,6 @@ static const struct das1800_board das1800_boards[] = { ...@@ -344,7 +333,6 @@ static const struct das1800_board das1800_boards[] = {
.id = DAS1800_ID_ST, .id = DAS1800_ID_ST,
.ai_speed = 3000, .ai_speed = 3000,
.qram_len = 256, .qram_len = 256,
.do_n_chan = 4,
.ao_ability = 0, .ao_ability = 0,
.ao_n_chan = 0, .ao_n_chan = 0,
.range_ai = &range_ai_das1802, .range_ai = &range_ai_das1802,
...@@ -354,7 +342,6 @@ static const struct das1800_board das1800_boards[] = { ...@@ -354,7 +342,6 @@ static const struct das1800_board das1800_boards[] = {
.id = DAS1800_ID_ST_DA, .id = DAS1800_ID_ST_DA,
.ai_speed = 3000, .ai_speed = 3000,
.qram_len = 256, .qram_len = 256,
.do_n_chan = 4,
.ao_ability = 1, .ao_ability = 1,
.ao_n_chan = 4, .ao_n_chan = 4,
.range_ai = &range_ai_das1802, .range_ai = &range_ai_das1802,
...@@ -364,7 +351,6 @@ static const struct das1800_board das1800_boards[] = { ...@@ -364,7 +351,6 @@ static const struct das1800_board das1800_boards[] = {
.id = DAS1800_ID_HR, .id = DAS1800_ID_HR,
.ai_speed = 10000, .ai_speed = 10000,
.qram_len = 256, .qram_len = 256,
.do_n_chan = 4,
.ao_ability = 0, .ao_ability = 0,
.ao_n_chan = 0, .ao_n_chan = 0,
.range_ai = &range_ai_das1802, .range_ai = &range_ai_das1802,
...@@ -374,7 +360,6 @@ static const struct das1800_board das1800_boards[] = { ...@@ -374,7 +360,6 @@ static const struct das1800_board das1800_boards[] = {
.id = DAS1800_ID_HR_DA, .id = DAS1800_ID_HR_DA,
.ai_speed = 10000, .ai_speed = 10000,
.qram_len = 256, .qram_len = 256,
.do_n_chan = 4,
.ao_ability = 1, .ao_ability = 1,
.ao_n_chan = 2, .ao_n_chan = 2,
.range_ai = &range_ai_das1802, .range_ai = &range_ai_das1802,
...@@ -384,7 +369,6 @@ static const struct das1800_board das1800_boards[] = { ...@@ -384,7 +369,6 @@ static const struct das1800_board das1800_boards[] = {
.id = DAS1800_ID_HC, .id = DAS1800_ID_HC,
.ai_speed = 3000, .ai_speed = 3000,
.qram_len = 64, .qram_len = 64,
.do_n_chan = 8,
.ao_ability = 1, .ao_ability = 1,
.ao_n_chan = 2, .ao_n_chan = 2,
.range_ai = &range_ai_das1801, .range_ai = &range_ai_das1801,
...@@ -394,7 +378,6 @@ static const struct das1800_board das1800_boards[] = { ...@@ -394,7 +378,6 @@ static const struct das1800_board das1800_boards[] = {
.id = DAS1800_ID_HC, .id = DAS1800_ID_HC,
.ai_speed = 3000, .ai_speed = 3000,
.qram_len = 64, .qram_len = 64,
.do_n_chan = 8,
.ao_ability = 1, .ao_ability = 1,
.ao_n_chan = 2, .ao_n_chan = 2,
.range_ai = &range_ai_das1802, .range_ai = &range_ai_das1802,
...@@ -404,7 +387,6 @@ static const struct das1800_board das1800_boards[] = { ...@@ -404,7 +387,6 @@ static const struct das1800_board das1800_boards[] = {
.id = DAS1800_ID_AO, .id = DAS1800_ID_AO,
.ai_speed = 3000, .ai_speed = 3000,
.qram_len = 256, .qram_len = 256,
.do_n_chan = 4,
.ao_ability = 2, .ao_ability = 2,
.ao_n_chan = 2, .ao_n_chan = 2,
.range_ai = &range_ai_das1801, .range_ai = &range_ai_das1801,
...@@ -414,7 +396,6 @@ static const struct das1800_board das1800_boards[] = { ...@@ -414,7 +396,6 @@ static const struct das1800_board das1800_boards[] = {
.id = DAS1800_ID_AO, .id = DAS1800_ID_AO,
.ai_speed = 3000, .ai_speed = 3000,
.qram_len = 256, .qram_len = 256,
.do_n_chan = 4,
.ao_ability = 2, .ao_ability = 2,
.ao_n_chan = 2, .ao_n_chan = 2,
.range_ai = &range_ai_das1802, .range_ai = &range_ai_das1802,
...@@ -1401,7 +1382,7 @@ static int das1800_attach(struct comedi_device *dev, ...@@ -1401,7 +1382,7 @@ static int das1800_attach(struct comedi_device *dev,
s = &dev->subdevices[3]; s = &dev->subdevices[3];
s->type = COMEDI_SUBD_DO; s->type = COMEDI_SUBD_DO;
s->subdev_flags = SDF_WRITABLE; s->subdev_flags = SDF_WRITABLE;
s->n_chan = board->do_n_chan; s->n_chan = (board->id == DAS1800_ID_HC) ? 8 : 4;
s->maxdata = 1; s->maxdata = 1;
s->range_table = &range_digital; s->range_table = &range_digital;
s->insn_bits = das1800_do_insn_bits; s->insn_bits = das1800_do_insn_bits;
......
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