Commit b72b3656 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman
Browse files

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: 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 5c66a77e
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -462,11 +462,10 @@ static int apci3120_cyclic_ai(int mode,

			devpriv->b_Timer2Mode = APCI3120_COUNTER;
			devpriv->b_Timer2Interrupt = 1;
		}
	}

	if (!devpriv->us_UseDma && cmd->stop_src == TRIG_COUNT)
			apci3120_timer_enable(dev, 2, true);
		}
	}

	switch (mode) {
	case 1: