staging: comedi: comedi_test: simplify time since last AI scan
authorIan Abbott <abbotti@mev.co.uk>
Tue, 27 Oct 2015 16:59:17 +0000 (16:59 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Oct 2015 23:58:36 +0000 (08:58 +0900)
commit66d4da800d1a70e7c6b27ba7a61e4bc39b1f3304
tree6353bd16d773801bccb84790209b8bee2067b3f2
parent21ec1bf73483f1cceb252ecf9323160fc9473f7b
staging: comedi: comedi_test: simplify time since last AI scan

The private data structure `struct waveform_private` currently uses
member `last` to remember the time of the last timer interrupt, and the
member `usec_remainder` to keep track of how far into a simulated scan
the interrupt occurred.  Replace these with a single new member
`ai_last_scan_time` that records the time of the last scan.  This
simplifies the calculation of the number of scans to simulate in the
timer routine, `waveform_ai_interrupt()`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/comedi_test.c
This page took 0.04194 seconds and 5 git commands to generate.