staging: comedi: addi_apci_3120: move timer 2 enable in apci3120_cyclic_ai()

Move the enable of timer 2 to avoid needing the extra if() check.

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:49 -07:00
committed by Greg Kroah-Hartman
parent 5c66a77e1d
commit b72b365666

View File

@@ -462,12 +462,11 @@ static int apci3120_cyclic_ai(int mode,
devpriv->b_Timer2Mode = APCI3120_COUNTER;
devpriv->b_Timer2Interrupt = 1;
apci3120_timer_enable(dev, 2, true);
}
}
if (!devpriv->us_UseDma && cmd->stop_src == TRIG_COUNT)
apci3120_timer_enable(dev, 2, true);
switch (mode) {
case 1:
apci3120_timer_enable(dev, 0, true);