diff options
| author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2015-01-13 10:16:44 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-01-17 14:31:31 -0800 |
| commit | 5e5a21cf8e7756f668e7eb51ba99619136b79c4d (patch) | |
| tree | b97322e342154e2ecacb0de1bb1eb45ab611b5fe /tools/perf/scripts/python/export-to-postgresql.py | |
| parent | 620ec185a208f5bf54af46912ae75a330697bd3f (diff) | |
staging: comedi: das1800: tidy up das1800_ai_transfer_size()
For aesthetics, pass the fill time 'ns' as a parameter to this function.
Refactor this function to calculate the transfer size in 'samples' instead
of 'bytes'. This removes the need to constantly multiply the values by the
'sample_size'. It also helps avoid any possible integer overflow issues.
Use the comedi_nsamples_left() helper to limit the samples when cmd->stop_src
is TRIG_COUNT.
Use comedi_samples_to_bytes() to return the final DMA size in bytes.
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 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions
