From: H Hartley Sweeten Date: Tue, 29 Apr 2014 18:08:37 +0000 (-0700) Subject: staging: comedi: adv_pci1710: only calc the pacer divisors once X-Git-Tag: omap-for-v3.16/fixes-against-rc1~39^2~36^2~1082 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=73bcf01cb8c57c699c2a194fef3bad9bd39d6e1a;p=pandora-kernel.git 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: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed