From: H Hartley Sweeten Date: Tue, 4 Nov 2014 17:54:49 +0000 (-0700) Subject: staging: comedi: addi_apci_3120: move timer 2 enable in apci3120_cyclic_ai() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b72b365666701b66d8ff09a5023b0d097d38e538;p=linux-beck.git 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 Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c index 31ef047b6281..1481d18a12fa 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c @@ -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);