staging: comedi: addi_apci_3501: analog output resolution is fixed
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 23 Jan 2013 19:40:50 +0000 (12:40 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Jan 2013 20:00:29 +0000 (12:00 -0800)
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: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/addi_apci_3501.c

index 1408df3fcec44fb78b4734e52439dd778d4203ca..469d4b87a0ec200013305edf53bfed6e3eb5e027 100644 (file)
@@ -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;