Skip to content

Commit

Permalink
staging: comedi: me_daq: remove dio_channel_nbr from boardinfo
Browse files Browse the repository at this point in the history
All the boards supported by this driver have 32 dio channels.
Remove the boardinfo and just open code the value in the attach.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Oct 26, 2012
1 parent 78830a7 commit 20482c7
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions drivers/staging/comedi/drivers/me_daq.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ struct me_board {
int ai_channel_nbr; /* AD config */
int ai_resolution;
const struct comedi_lrange *ai_range_list;
int dio_channel_nbr; /* DIO config */
};

static const struct me_board me_boards[] = {
Expand All @@ -197,7 +196,6 @@ static const struct me_board me_boards[] = {
/* Analog Input */
.ai_resolution = 12,
.ai_range_list = &me2600_ai_range,
.dio_channel_nbr = 32,
},
{
.name = "me-2000i",
Expand All @@ -206,7 +204,6 @@ static const struct me_board me_boards[] = {
/* Analog Input */
.ai_resolution = 12,
.ai_range_list = &me2000_ai_range,
.dio_channel_nbr = 32,
}
};

Expand Down Expand Up @@ -741,9 +738,9 @@ static int me_attach_pci(struct comedi_device *dev, struct pci_dev *pcidev)
s = &dev->subdevices[2];
s->type = COMEDI_SUBD_DIO;
s->subdev_flags = SDF_READABLE | SDF_WRITEABLE;
s->n_chan = board->dio_channel_nbr;
s->n_chan = 32;
s->maxdata = 1;
s->len_chanlist = board->dio_channel_nbr;
s->len_chanlist = 32;
s->range_table = &range_digital;
s->insn_bits = me_dio_insn_bits;
s->insn_config = me_dio_insn_config;
Expand Down

0 comments on commit 20482c7

Please sign in to comment.