staging: comedi: quatech_daqp_cs: avoid calculating pacer divisor multiple times
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 5 Oct 2015 21:23:11 +0000 (14:23 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Oct 2015 04:16:05 +0000 (21:16 -0700)
commit62319bceef42015d5e774e1db2e21fb5853a01bc
tree8d19f62a3ad9f0f541119c95b5fd63e017de255a
parent0d77ef8b43d6a9124f37b2f098b6d65573db0de3
staging: comedi: quatech_daqp_cs: avoid calculating pacer divisor multiple times

The pacer will either be used to trigger each conversion or to start each
scan. Modify the (*do_cmdtest) so that one one divisor calculation is needed.
Save the divisor value in the private data so that the (*do_cmd) does not
have to do the calculation again.

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>
drivers/staging/comedi/drivers/quatech_daqp_cs.c