[PATCH 14/30] staging: comedi: addi_apci_3501: analog output resolution is fixed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxx>
Cc: Ian Abbott <abbotti@xxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/staging/comedi/drivers/addi_apci_3501.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/comedi/drivers/addi_apci_3501.c b/drivers/staging/comedi/drivers/addi_apci_3501.c
index 1408df3..469d4b8 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;
-- 
1.8.1.1.293.gfe73786

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux