Skip to content
Commit 73bcf01c authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman
Browse files

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



When the cmd->convert_src == TRIG_TIMER the divisors needed to
generate the pacer time are calculated in the (*do_cmdtest) to
validate the cmd->convert_arg. The core always does the (*do_cmdtest)
before the (*do_cmd) so there is no reason to recalc the divisors.

Save the calculated divisors in the private data as 'next_divisor[12]'.
The (*do_cmd) then transfers them to the private data 'divisor[12]' so
that they can be used to set the timer for the command immediately or
later when the cmd->start_src is TRIG_EXT (mode 2 in this driver).

Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5297a6ba
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