diff options
author | H Hartley Sweeten <hartleys@visionengravers.com> | 2012-09-11 13:48:27 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-09-11 14:03:16 -0700 |
commit | d68a8635c5b706e3c037d89fd130e62ddce5c823 (patch) | |
tree | 969b3be59c547c38c0b4b71f78e4a529c5806832 | |
parent | abdeac3fd65534dd9b8f46a0fa3ce5c9d545a8f7 (diff) |
staging: comedi: icp_multi: remove rangecode from boardinfo
The analog inputs and outputs for this driver use the same table
to set the analog range. Remove the boardinfo for it and just
reference the table directly.
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>
-rw-r--r-- | drivers/staging/comedi/drivers/icp_multi.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/staging/comedi/drivers/icp_multi.c b/drivers/staging/comedi/drivers/icp_multi.c index 3a2fc740c5fc..95262c731d87 100644 --- a/drivers/staging/comedi/drivers/icp_multi.c +++ b/drivers/staging/comedi/drivers/icp_multi.c @@ -130,7 +130,6 @@ struct boardtype { int iorange; /* I/O range len */ char have_irq; /* 1=card support IRQ */ char cardtype; /* 0=ICP Multi */ - const char *rangecode; /* range codes for programming */ }; struct icp_multi_private { @@ -212,7 +211,7 @@ static void setup_channel_list(struct comedi_device *dev, devpriv->AdcCmdStatus |= (chanprog << 8); /* Get range for current channel */ - range = this_board->rangecode[CR_RANGE(chanlist[i])]; + range = range_codes_analog[CR_RANGE(chanlist[i])]; /* Set range. bits 4-5 */ devpriv->AdcCmdStatus |= range; @@ -351,7 +350,7 @@ static int icp_multi_insn_write_ao(struct comedi_device *dev, /* Bit 5 = 1 : 10V */ /* Bits 8-9 : Channel number */ devpriv->DacCmdStatus &= 0xfccf; - devpriv->DacCmdStatus |= this_board->rangecode[range]; + devpriv->DacCmdStatus |= range_codes_analog[range]; devpriv->DacCmdStatus |= (chan << 8); writew(devpriv->DacCmdStatus, devpriv->io_addr + ICP_MULTI_DAC_CSR); @@ -879,7 +878,6 @@ static const struct boardtype boardtypes[] = { .iorange = IORANGE_ICP_MULTI, .have_irq = 1, .cardtype = TYPE_ICP_MULTI, - .rangecode = range_codes_analog, }, }; |