Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
iio: imu: adis16400: Fix buffer alignment requirements.
iio_push_to_buffers_with_timestamp() requires that the buffer is 8 byte alignment to ensure an inserted timestamp is naturally aligned. This requirement was not met here when burst mode is in use beause of a leading u16. Use the new iio_push_to_buffers_with_ts_unaligned() function that has more relaxed requirements. It is somewhat complex to access that actual data length, but a safe bound can be found by using scan_bytes - sizeof(timestamp) so that is used in this path. More efficient approaches exist, but this ensure correctness at the cost of using a bounce buffer. Fixes: 5075e07 ("iio: imu: adis: generalize burst mode support") Signed-off-by: Jonathan Cameron <[email protected]> Reviewed-by: Nuno Sá <[email protected]> Link: https://lore.kernel.org/r/[email protected]
- Loading branch information