Move the enable of timer 2 to avoid needing the extra if() check. Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx> Cc: Ian Abbott <abbotti@xxxxxxxxx> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c index 31ef047..1481d18 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); -- 2.0.3 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel