Skip to content

Commit

Permalink
staging: comedi: das800: remove extra divisor calculation call
Browse files Browse the repository at this point in the history
The comedi core always calls the (*do_cmdtest) function before it
calls the (*do_cmd) function. The divisors were already calculated
in das800_ai_do_cmdtest(), it is not necessary to calculate them
again in das800_ai_do_cmd().

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>
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Apr 23, 2013
1 parent 57d1ebf commit 264601c
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions drivers/staging/comedi/drivers/das800.c
Original file line number Diff line number Diff line change
Expand Up @@ -453,11 +453,6 @@ static int das800_ai_do_cmd(struct comedi_device *dev,
case TRIG_TIMER:
conv_bits |= CASC | ITE;
/* set conversion frequency */
i8253_cascade_ns_to_timer_2div(TIMER_BASE, &(devpriv->divisor1),
&(devpriv->divisor2),
&(async->cmd.convert_arg),
async->cmd.
flags & TRIG_ROUND_MASK);
if (das800_set_frequency(dev) < 0) {
comedi_error(dev, "Error setting up counters");
return -1;
Expand Down

0 comments on commit 264601c

Please sign in to comment.