Skip to content

Commit c0fb5c3

Browse files
jic23jfvogel
authored andcommitted
iio: accel: adxl355: Make timestamp 64-bit aligned using aligned_s64
[ Upstream commit 1bb9422 ] The IIO ABI requires 64-bit aligned timestamps. In this case insufficient padding would have been added on architectures where an s64 is only 32-bit aligned. Use aligned_s64 to enforce the correct alignment. Fixes: 327a0ea ("iio: accel: adxl355: Add triggered buffer support") Reported-by: David Lechner <dlechner@baylibre.com> Reviewed-by: Nuno Sá <nuno.sa@analog.com> Reviewed-by: David Lechner <dlechner@baylibre.com> Link: https://patch.msgid.link/20250413103443.2420727-5-jic23@kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Sasha Levin <sashal@kernel.org> (cherry picked from commit ef5d6a40968021edc05debd19fdf7a4ca5bd1b50) Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
1 parent 4f208b4 commit c0fb5c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iio/accel/adxl355_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ struct adxl355_data {
231231
u8 transf_buf[3];
232232
struct {
233233
u8 buf[14];
234-
s64 ts;
234+
aligned_s64 ts;
235235
} buffer;
236236
} __aligned(IIO_DMA_MINALIGN);
237237
};

0 commit comments

Comments
 (0)