From 4a5667180ba842db256ef9aa2fab938ad1e8268a Mon Sep 17 00:00:00 2001 From: David Schleef Date: Sat, 14 Jul 2001 21:39:24 +0000 Subject: [PATCH] Fix a little buglet in cmd_test --- comedi/drivers/das16.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/comedi/drivers/das16.c b/comedi/drivers/das16.c index ab833cdd..c82aadf8 100644 --- a/comedi/drivers/das16.c +++ b/comedi/drivers/das16.c @@ -704,17 +704,21 @@ static int das16_cmd_test(comedi_device *dev,comedi_subdevice *s, comedi_cmd *cm // step 4: fix up arguments if(cmd->scan_begin_src == TRIG_TIMER) { + unsigned int tmp = cmd->scan_begin_arg; // set divisors, correct timing arguments - i8253_cascade_ns_to_timer_2div(devpriv->clockbase, &(devpriv->divisor1), - &(devpriv->divisor2), &(cmd->scan_begin_arg), cmd->flags & TRIG_ROUND_MASK); - err++; + i8253_cascade_ns_to_timer_2div(devpriv->clockbase, + &(devpriv->divisor1), &(devpriv->divisor2), + &(cmd->scan_begin_arg), cmd->flags & TRIG_ROUND_MASK); + err += (tmp!=cmd->scan_begin_arg); } if(cmd->convert_src == TRIG_TIMER) { + unsigned int tmp = cmd->convert_arg; // set divisors, correct timing arguments - i8253_cascade_ns_to_timer_2div(devpriv->clockbase, &(devpriv->divisor1), - &(devpriv->divisor2), &(cmd->convert_arg), cmd->flags & TRIG_ROUND_MASK); - err++; + i8253_cascade_ns_to_timer_2div(devpriv->clockbase, + &(devpriv->divisor1), &(devpriv->divisor2), + &(cmd->convert_arg), cmd->flags & TRIG_ROUND_MASK); + err += (tmp!=cmd->convert_arg); } if(err)return 4; -- 2.26.2