]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: comedi: addi_apci_3120: move timer 2 enable in apci3120_cyclic_ai()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 4 Nov 2014 17:54:49 +0000 (10:54 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Nov 2014 17:34:02 +0000 (09:34 -0800)
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>
drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c

index 31ef047b6281969877fe5b5e7ae63c7395419143..1481d18a12fa0f3b258a1f0e1d5046a704e6ba15 100644 (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);