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

staging: comedi: addi_apci_3501: analog output resolution is fixed

The analog outputs of this board are always 14-bit. Remove this
information from the boardinfo and just set the 'maxdata' directly
in the subdevice init. Initialize with a hex value as that is more
standard in the comedi drivers.

Since devpriv->s_EeParameters.i_AoMaxdata is not longer being used,
don't bother initializing it.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 09680870
......@@ -16,7 +16,6 @@ static const struct addi_board apci3501_boardtypes[] = {
.i_IorangeBase1 = APCI3501_ADDRESS_RANGE,
.i_PCIEeprom = ADDIDATA_EEPROM,
.pc_EepromChip = ADDIDATA_S5933,
.i_AoMaxdata = 16383,
.pr_AoRangelist = &range_apci3501_ao,
.ao_config = i_APCI3501_ConfigAnalogOutput,
.ao_write = i_APCI3501_WriteAnalogOutput,
......@@ -190,7 +189,6 @@ static int apci3501_auto_attach(struct comedi_device *dev,
/* Initialize parameters that can be overridden in EEPROM */
devpriv->s_EeParameters.i_NbrAoChannel = this_board->i_NbrAoChannel;
devpriv->s_EeParameters.i_AoMaxdata = this_board->i_AoMaxdata;
if (pcidev->irq > 0) {
ret = request_irq(pcidev->irq, apci3501_interrupt, IRQF_SHARED,
......@@ -216,7 +214,7 @@ static int apci3501_auto_attach(struct comedi_device *dev,
s->type = COMEDI_SUBD_AO;
s->subdev_flags = SDF_WRITEABLE | SDF_GROUND | SDF_COMMON;
s->n_chan = devpriv->s_EeParameters.i_NbrAoChannel;
s->maxdata = devpriv->s_EeParameters.i_AoMaxdata;
s->maxdata = 0x3fff;
s->len_chanlist =
devpriv->s_EeParameters.i_NbrAoChannel;
s->range_table = this_board->pr_AoRangelist;
......
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