diff options
author | 2021-02-23 14:30:46 +0000 | |
---|---|---|
committer | 2021-03-10 09:23:29 +0100 | |
commit | 459b1e8c8fe97fcba0bd1b623471713dce2c5eaf (patch) | |
tree | e13b407fb8438cbbbd52bc892b8c2b79eff501e9 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | staging: comedi: das6402: Fix endian problem for AI command data (diff) | |
download | wireguard-linux-459b1e8c8fe97fcba0bd1b623471713dce2c5eaf.tar.xz wireguard-linux-459b1e8c8fe97fcba0bd1b623471713dce2c5eaf.zip |
staging: comedi: das800: Fix endian problem for AI command data
The analog input subdevice supports Comedi asynchronous commands that
use Comedi's 16-bit sample format. However, the call to
`comedi_buf_write_samples()` is passing the address of a 32-bit integer
variable. On bigendian machines, this will copy 2 bytes from the wrong
end of the 32-bit value. Fix it by changing the type of the variable
holding the sample value to `unsigned short`.
Fixes: ad9eb43c93d8 ("staging: comedi: das800: use comedi_buf_write_samples()")
Cc: <stable@vger.kernel.org> # 3.19+
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Link: https://lore.kernel.org/r/20210223143055.257402-6-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