Commit ffbc26bc authored by Jonathan Cameron's avatar Jonathan Cameron
Browse files

iio: adc: ad7768-1: Fix insufficient alignment of timestamp.



On architectures where an s64 is not 64-bit aligned, this may result
insufficient alignment of the timestamp and the structure being too small.
Use aligned_s64 to force the alignment.

Fixes: a1caeeba ("iio: adc: ad7768-1: Fix too small buffer passed to iio_push_to_buffers_with_timestamp()") # aligned_s64 newer
Reported-by: default avatarDavid Lechner <dlechner@baylibre.com>
Reviewed-by: default avatarNuno Sá <nuno.sa@analog.com>
Reviewed-by: default avatarDavid Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20250413103443.2420727-3-jic23@kernel.org


Cc: <Stable@vger.kernel.org>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 5097eaae
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -168,7 +168,7 @@ struct ad7768_state {
	union {
		struct {
			__be32 chan;
			s64 timestamp;
			aligned_s64 timestamp;
		} scan;
		__be32 d32;
		u8 d8[2];