Commit 43268701 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: amplc_pci224: only calc the pacer divisors once

When the cmd->scan_begin_src == TRIG_TIMER the divisors needed to
generate the pacer time are calculated in the (*do_cmdtest) to
validate the cmd->scan_begin_arg. The core always does the
(*do_cmdtest) before the (*do_cmd) so there is no reason to recalc
the divisors.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent afb2bf14
...@@ -869,14 +869,6 @@ static void pci224_ao_start_pacer(struct comedi_device *dev, ...@@ -869,14 +869,6 @@ static void pci224_ao_start_pacer(struct comedi_device *dev,
struct comedi_subdevice *s) struct comedi_subdevice *s)
{ {
struct pci224_private *devpriv = dev->private; struct pci224_private *devpriv = dev->private;
struct comedi_cmd *cmd = &s->async->cmd;
/* Use two timers. */
i8253_cascade_ns_to_timer(I8254_OSC_BASE_10MHZ,
&devpriv->cached_div1,
&devpriv->cached_div2,
&cmd->scan_begin_arg,
cmd->flags);
/* /*
* The output of timer Z2-0 will be used as the scan trigger * The output of timer Z2-0 will be used as the scan trigger
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment