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

staging: comedi: addi_apci_3120: remove boardinfo 'i_AiChannelList'

All boardinfo entries have this member set as '16'. This is also the Analog
Input 'n_chan'. For aesthetics, initialize the Analog Input 'len_chanlist'
with s->n_chan and remove the boardinfo member.
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 98ea9f85
...@@ -16,7 +16,6 @@ enum apci3120_boardid { ...@@ -16,7 +16,6 @@ enum apci3120_boardid {
struct apci3120_board { struct apci3120_board {
const char *name; const char *name;
int i_AiChannelList;
int i_NbrAoChannel; int i_NbrAoChannel;
int i_AiMaxdata; int i_AiMaxdata;
int i_AoMaxdata; int i_AoMaxdata;
...@@ -25,14 +24,12 @@ struct apci3120_board { ...@@ -25,14 +24,12 @@ struct apci3120_board {
static const struct apci3120_board apci3120_boardtypes[] = { static const struct apci3120_board apci3120_boardtypes[] = {
[BOARD_APCI3120] = { [BOARD_APCI3120] = {
.name = "apci3120", .name = "apci3120",
.i_AiChannelList = 16,
.i_NbrAoChannel = 8, .i_NbrAoChannel = 8,
.i_AiMaxdata = 0xffff, .i_AiMaxdata = 0xffff,
.i_AoMaxdata = 0x3fff, .i_AoMaxdata = 0x3fff,
}, },
[BOARD_APCI3001] = { [BOARD_APCI3001] = {
.name = "apci3001", .name = "apci3001",
.i_AiChannelList = 16,
.i_AiMaxdata = 0xfff, .i_AiMaxdata = 0xfff,
}, },
}; };
...@@ -109,7 +106,7 @@ static int apci3120_auto_attach(struct comedi_device *dev, ...@@ -109,7 +106,7 @@ static int apci3120_auto_attach(struct comedi_device *dev,
| SDF_DIFF; | SDF_DIFF;
s->n_chan = 16; s->n_chan = 16;
s->maxdata = this_board->i_AiMaxdata; s->maxdata = this_board->i_AiMaxdata;
s->len_chanlist = this_board->i_AiChannelList; s->len_chanlist = s->n_chan;
s->range_table = &range_apci3120_ai; s->range_table = &range_apci3120_ai;
s->insn_config = apci3120_ai_insn_config; s->insn_config = apci3120_ai_insn_config;
......
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