Skip to content

Commit

Permalink
iio: accel: adxl355: Make timestamp 64-bit aligned using aligned_s64
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jonathan Cameron authored and Jonathan Cameron committed Apr 18, 2025
1 parent f79aeb6 commit 1bb9422
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/iio/accel/adxl355_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ struct adxl355_data {
u8 transf_buf[3];
struct {
u8 buf[14];
s64 ts;
aligned_s64 ts;
} buffer;
} __aligned(IIO_DMA_MINALIGN);
};
Expand Down

0 comments on commit 1bb9422

Please sign in to comment.