diff options
author | Lars Möllendorf <[email protected]> | 2019-12-13 14:50:55 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2020-01-13 12:08:37 +0100 |
commit | 883f616530692d81cb70f8a32d85c0d2afc05f69 (patch) | |
tree | 66abdf8221bc13139e1ca7fb6e543e0d615f9dda /lib/mpi/mpiutil.c | |
parent | 217afe63ccf445fc220e5ef480683607b05c0aa5 (diff) |
iio: buffer: align the size of scan bytes to size of the largest element
Previous versions of `iio_compute_scan_bytes` only aligned each element
to its own length (i.e. its own natural alignment). Because multiple
consecutive sets of scan elements are buffered this does not work in
case the computed scan bytes do not align with the natural alignment of
the first scan element in the set.
This commit fixes this by aligning the scan bytes to the natural
alignment of the largest scan element in the set.
Fixes: 959d2952d124 ("staging:iio: make iio_sw_buffer_preenable much more general.")
Signed-off-by: Lars Möllendorf <[email protected]>
Reviewed-by: Lars-Peter Clausen <[email protected]>
Cc: <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'lib/mpi/mpiutil.c')
0 files changed, 0 insertions, 0 deletions