mirror of
https://github.com/torvalds/linux.git
synced 2024-12-22 02:52:56 +00:00
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>
This commit is contained in:
parent
61048cf4b9
commit
08be3097fa
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user