diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2014-11-05 10:20:52 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-11-05 14:59:46 -0800 |
commit | 1dacbe5b26268fd3eaa6dad41271d296b072f3df (patch) | |
tree | 1602523e9f5cb50e02e8a0ae24cbdfe4e10a1014 /drivers/staging/comedi/comedidev.h | |
parent | staging: panel: Fix single-open policy race condition (diff) | |
download | linux-1dacbe5b26268fd3eaa6dad41271d296b072f3df.tar.gz linux-1dacbe5b26268fd3eaa6dad41271d296b072f3df.tar.bz2 linux-1dacbe5b26268fd3eaa6dad41271d296b072f3df.zip |
staging: comedi: comedidev.h: add 'scans_done' member to comedi_async
Introduce a new member to comedi_async to count the number of scans completed.
This member is cleared by comedi_buf_reset() along with the other comedi_async
members. It is incremented in comedi_inc_scan_progress() when the end of scan
is detected.
This member will be used to clean up the scan counting in the comedi drivers.
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>
Diffstat (limited to 'drivers/staging/comedi/comedidev.h')
-rw-r--r-- | drivers/staging/comedi/comedidev.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/comedi/comedidev.h b/drivers/staging/comedi/comedidev.h index 90af11aaef7e..bff5a581a287 100644 --- a/drivers/staging/comedi/comedidev.h +++ b/drivers/staging/comedi/comedidev.h @@ -121,6 +121,7 @@ struct comedi_buf_map { * @buf_read_ptr: buffer position for reader * @cur_chan: current position in chanlist for scan (for those * drivers that use it) + * @scans_done: the number of scans completed (COMEDI_CB_EOS) * @scan_progress: amount received or sent for current scan (in bytes) * @munge_chan: current position in chanlist for "munging" * @munge_count: "munge" count (in bytes, modulo 2**32) @@ -201,6 +202,7 @@ struct comedi_async { unsigned int buf_write_ptr; unsigned int buf_read_ptr; unsigned int cur_chan; + unsigned int scans_done; unsigned int scan_progress; unsigned int munge_chan; unsigned int munge_count; |