staging: comedi: addi_apci_3120: remove private data 'ui_EocEosConversionTime'

This driver tries to be tricky and allow passing an analog input conversion time
for the (*insn_read) in the (*insn_config).  The (*insn_config) doesn't follow
the comedi API and this programmable conversion time is not part of the API for
(*insn_read) operations.

Remove the member from the private data and use a fixed 10us (10000ns) conversion
time in the (*insn_read).

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
H Hartley Sweeten
2014-11-04 10:54:29 -07:00
committed by Greg Kroah-Hartman
parent 34c0ae09a6
commit 46ad4793a7
2 changed files with 1 additions and 10 deletions

View File

@@ -114,9 +114,6 @@ static int apci3120_ai_insn_config(struct comedi_device *dev,
if (data[0] != APCI3120_EOC_MODE)
return -1;
/* Check for Conversion time to be added */
devpriv->ui_EocEosConversionTime = data[2];
devpriv->b_InterruptMode = APCI3120_EOC_MODE;
if (data[1])
devpriv->b_EocEosInterrupt = APCI3120_ENABLE;
@@ -172,10 +169,7 @@ static int apci3120_ai_insn_read(struct comedi_device *dev,
unsigned short us_TmpValue, i;
/* fix conversion time to 10 us */
if (!devpriv->ui_EocEosConversionTime)
ns = 10000;
else
ns = devpriv->ui_EocEosConversionTime;
ns = 10000;
/* Clear software registers */
devpriv->timer_mode = 0;
@@ -240,7 +234,6 @@ static int apci3120_ai_insn_read(struct comedi_device *dev,
dev_err(dev->class_dev, "inputs wrong\n");
}
devpriv->ui_EocEosConversionTime = 0; /* re initializing the variable */
}
return insn->n;
@@ -254,7 +247,6 @@ static int apci3120_reset(struct comedi_device *dev)
devpriv->ai_running = 0;
devpriv->b_EocEosInterrupt = APCI3120_DISABLE;
devpriv->b_InterruptMode = APCI3120_EOC_MODE;
devpriv->ui_EocEosConversionTime = 0; /* set eoc eos conv time to 0 */
/* variables used in timer subdevice */
devpriv->b_Timer2Mode = 0;

View File

@@ -129,7 +129,6 @@ struct apci3120_private {
unsigned int ai_running:1;
unsigned char b_InterruptMode;
unsigned char b_EocEosInterrupt;
unsigned int ui_EocEosConversionTime;
unsigned char b_ExttrigEnable;
struct task_struct *tsk_Current;
};