Commit 596c5a6e authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: addi_common.h: remove 'ui_AiTimer0' from private data

This member of the private data is a copy of the cmd->convert_arg. Use
that instead.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent bda88cd4
...@@ -123,7 +123,6 @@ struct addi_private { ...@@ -123,7 +123,6 @@ struct addi_private {
unsigned int ui_AiNbrofChannels; /* how many channels is measured */ unsigned int ui_AiNbrofChannels; /* how many channels is measured */
unsigned int ui_AiChannelList[32]; /* actual chanlist */ unsigned int ui_AiChannelList[32]; /* actual chanlist */
unsigned int ui_AiReadData[32]; unsigned int ui_AiReadData[32];
unsigned int ui_AiTimer0; /* Timer Constant for Timer0 */
unsigned int ui_AiTimer1; /* Timer constant for Timer1 */ unsigned int ui_AiTimer1; /* Timer constant for Timer1 */
unsigned int ui_AiDataLength; unsigned int ui_AiDataLength;
unsigned int ui_AiNbrofScans; /* number of scans to do */ unsigned int ui_AiNbrofScans; /* number of scans to do */
......
...@@ -892,7 +892,7 @@ static int apci3120_cyclic_ai(int mode, ...@@ -892,7 +892,7 @@ static int apci3120_cyclic_ai(int mode,
/* value for timer2 minus -2 has to be done .....dunno y?? */ /* value for timer2 minus -2 has to be done .....dunno y?? */
ui_TimerValue2 = devpriv->ui_AiNbrofScans - 2; ui_TimerValue2 = devpriv->ui_AiNbrofScans - 2;
ui_ConvertTiming = devpriv->ui_AiTimer0; ui_ConvertTiming = cmd->convert_arg;
if (mode == 2) if (mode == 2)
ui_DelayTiming = devpriv->ui_AiTimer1; ui_DelayTiming = devpriv->ui_AiTimer1;
...@@ -1347,7 +1347,6 @@ static int apci3120_ai_cmd(struct comedi_device *dev, ...@@ -1347,7 +1347,6 @@ static int apci3120_ai_cmd(struct comedi_device *dev,
else else
devpriv->ui_AiNbrofScans = 0; devpriv->ui_AiNbrofScans = 0;
devpriv->ui_AiTimer0 = 0; /* variables changed to timer0,timer1 */
devpriv->ui_AiTimer1 = 0; devpriv->ui_AiTimer1 = 0;
if ((devpriv->ui_AiNbrofScans == 0) || (devpriv->ui_AiNbrofScans == -1)) if ((devpriv->ui_AiNbrofScans == 0) || (devpriv->ui_AiNbrofScans == -1))
devpriv->b_AiContinuous = 1; /* user want neverending analog acquisition */ devpriv->b_AiContinuous = 1; /* user want neverending analog acquisition */
...@@ -1363,7 +1362,6 @@ static int apci3120_ai_cmd(struct comedi_device *dev, ...@@ -1363,7 +1362,6 @@ static int apci3120_ai_cmd(struct comedi_device *dev,
if (cmd->convert_src == TRIG_TIMER) { if (cmd->convert_src == TRIG_TIMER) {
/* mode 1 */ /* mode 1 */
devpriv->ui_AiTimer0 = cmd->convert_arg; /* timer constant in nano seconds */
/* return this_board->ai_cmd(1,dev,s); */ /* return this_board->ai_cmd(1,dev,s); */
return apci3120_cyclic_ai(1, dev, s); return apci3120_cyclic_ai(1, dev, s);
} }
...@@ -1373,7 +1371,6 @@ static int apci3120_ai_cmd(struct comedi_device *dev, ...@@ -1373,7 +1371,6 @@ static int apci3120_ai_cmd(struct comedi_device *dev,
&& (cmd->convert_src == TRIG_TIMER)) { && (cmd->convert_src == TRIG_TIMER)) {
/* mode 2 */ /* mode 2 */
devpriv->ui_AiTimer1 = cmd->scan_begin_arg; devpriv->ui_AiTimer1 = cmd->scan_begin_arg;
devpriv->ui_AiTimer0 = cmd->convert_arg; /* variable changed timer2 to timer0 */
/* return this_board->ai_cmd(2,dev,s); */ /* return this_board->ai_cmd(2,dev,s); */
return apci3120_cyclic_ai(2, dev, s); return apci3120_cyclic_ai(2, dev, s);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment