From: H Hartley Sweeten Date: Tue, 4 Nov 2014 17:54:29 +0000 (-0700) Subject: staging: comedi: addi_apci_3120: remove private data 'ui_EocEosConversionTime' X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=46ad4793a7c8ae2c347f86427a82c1f04bc80fc6;p=linux-beck.git 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 Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c index 2656e53999f8..9b18abf13b24 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c @@ -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; diff --git a/drivers/staging/comedi/drivers/addi_apci_3120.c b/drivers/staging/comedi/drivers/addi_apci_3120.c index 0f3dabfabfc8..13c06cd18456 100644 --- a/drivers/staging/comedi/drivers/addi_apci_3120.c +++ b/drivers/staging/comedi/drivers/addi_apci_3120.c @@ -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; };