Skip to content

Commit

Permalink
staging: comedi: icp_multi: remove ao_maxdata from boardinfo
Browse files Browse the repository at this point in the history
The analog outputs of this board always have 12-bit resolution.
Remove the boardinfo and just open-code the value.

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 Sep 11, 2012
1 parent 08567ce commit 68b82e0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/staging/comedi/drivers/icp_multi.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ struct boardtype {
char have_irq; /* 1=card support IRQ */
char cardtype; /* 0=ICP Multi */
int ai_maxdata; /* resolution of A/D */
int ao_maxdata; /* resolution of D/A */
const struct comedi_lrange *rangelist_ai; /* rangelist for A/D */
const char *rangecode; /* range codes for programming */
const struct comedi_lrange *rangelist_ao; /* rangelist for D/A */
Expand Down Expand Up @@ -815,7 +814,7 @@ static int icp_multi_attach(struct comedi_device *dev,
s->type = COMEDI_SUBD_AO;
s->subdev_flags = SDF_WRITABLE | SDF_GROUND | SDF_COMMON;
s->n_chan = 4;
s->maxdata = this_board->ao_maxdata;
s->maxdata = 0x0fff;
s->len_chanlist = 4;
s->range_table = &range_analog;
s->insn_write = icp_multi_insn_write_ao;
Expand Down Expand Up @@ -884,7 +883,6 @@ static const struct boardtype boardtypes[] = {
.have_irq = 1,
.cardtype = TYPE_ICP_MULTI,
.ai_maxdata = 0x0fff,
.ao_maxdata = 0x0fff,
.rangelist_ai = &range_analog,
.rangecode = range_codes_analog,
.rangelist_ao = &range_analog,
Expand Down

0 comments on commit 68b82e0

Please sign in to comment.