diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2013-06-12 16:16:05 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-06-17 14:33:42 -0700 |
commit | 08be3097fa1597f13b97ab390b0e80ce07cb4796 (patch) | |
tree | 5c7280ad94c78a1384db81eff7c54e4b04ebb081 /drivers | |
parent | 61048cf4b90043c6d403613a588866751cf20993 (diff) |
staging: comedi: addi_apci_3xxx: remove 'b_AiInitialisation' from private data
This variable is set during the attach of the board and never cleared
so the test in i_APCI3XXX_InsnReadAnalogInput() will always succeed.
Just remove the variable to help with cleaning up this driver.
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/comedi/drivers/addi-data/hwdrv_apci3xxx.c | 15 | ||||
-rw-r--r-- | drivers/staging/comedi/drivers/addi_apci_3xxx.c | 4 |
2 files changed, 0 insertions, 19 deletions
diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3xxx.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3xxx.c index 77599e437f37..a6142abdaeeb 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3xxx.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3xxx.c @@ -158,9 +158,6 @@ static int i_APCI3XXX_AnalogInputConfigOperatingMode(struct comedi_device *dev, b_SingelDiff = b_SingleDiff; - devpriv-> - b_AiInitialisation - = 1; /*******************************/ /* Set the convert timing unit */ @@ -327,11 +324,6 @@ static int i_APCI3XXX_InsnReadAnalogInput(struct comedi_device *dev, unsigned int dw_AcquisitionCpt = 0; unsigned char b_Interrupt = 0; - /*************************************/ - /* Test if operating mode configured */ - /*************************************/ - - if (devpriv->b_AiInitialisation) { /***************************/ /* Test the channel number */ /***************************/ @@ -502,13 +494,6 @@ static int i_APCI3XXX_InsnReadAnalogInput(struct comedi_device *dev, i_ReturnValue = -101; } } - } else { - /***************************/ - /* Channel selection error */ - /***************************/ - printk("Operating mode not configured\n"); - i_ReturnValue = -1; - } return i_ReturnValue; } diff --git a/drivers/staging/comedi/drivers/addi_apci_3xxx.c b/drivers/staging/comedi/drivers/addi_apci_3xxx.c index ffcacade5f82..88b609229c57 100644 --- a/drivers/staging/comedi/drivers/addi_apci_3xxx.c +++ b/drivers/staging/comedi/drivers/addi_apci_3xxx.c @@ -370,7 +370,6 @@ struct apci3xxx_private { int iobase; int i_IobaseReserved; void __iomem *dw_AiBase; - unsigned char b_AiInitialisation; unsigned int ui_AiNbrofChannels; /* how many channels is measured */ unsigned int ui_AiReadData[32]; unsigned char b_EocEosInterrupt; @@ -646,9 +645,6 @@ static int apci3xxx_auto_attach(struct comedi_device *dev, s->len_chanlist = board->i_AiChannelList; s->range_table = &apci3xxx_ai_range; - /* Set the initialisation flag */ - devpriv->b_AiInitialisation = 1; - s->insn_config = i_APCI3XXX_InsnConfigAnalogInput; s->insn_read = i_APCI3XXX_InsnReadAnalogInput; |