From: H Hartley Sweeten Date: Wed, 23 Jan 2013 19:40:50 +0000 (-0700) Subject: staging: comedi: addi_apci_3501: analog output resolution is fixed X-Git-Tag: firefly_0821_release~3680^2~1080^2~298 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=cfaa23de519b63ae4864a163fc9ba0a224c9f6b4;p=firefly-linux-kernel-4.4.55.git 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: H Hartley Sweeten Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/addi_apci_3501.c b/drivers/staging/comedi/drivers/addi_apci_3501.c index 1408df3fcec4..469d4b87a0ec 100644 --- a/drivers/staging/comedi/drivers/addi_apci_3501.c +++ b/drivers/staging/comedi/drivers/addi_apci_3501.c @@ -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;