diff options
author | Ian Abbott <[email protected]> | 2021-02-23 14:30:55 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2021-03-10 09:23:30 +0100 |
commit | fd3ce6557da0e7557a451ee56fc8f5700d3bd08f (patch) | |
tree | 9a44327ed825360b002b29d6c43b5726194c79b8 /lib/mpi/mpiutil.c | |
parent | 5ff1c08c28c331eee1ac6a02e8e3eabb329fa953 (diff) |
staging: comedi: pcl726: Use 16-bit 0 for interrupt data
The pcl726 driver has an "interrupt" subdevice that supports Comedi
asynchronous commands, placing a value in the Comedi buffer for each
interrupt. The subdevice uses Comedi's 16-bit sample format but the
interrupt handler is calling `comedi_buf_write_samples()` with the
address of a 32-bit integer `&s->state`. On bigendian machines, this
will copy 2 bytes from the wrong end of the 32-bit integer. This isn't
really a problem since `s->state` will always be 0 for this subdevice,
but clean it up by using a 16-bit variable initialized to 0 to pass the
value.
Signed-off-by: Ian Abbott <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'lib/mpi/mpiutil.c')
0 files changed, 0 insertions, 0 deletions