Skip to content

Commit 52d3498

Browse files
committed
iio: adc: ad7266: Fix potential timestamp alignment issue.
On architectures where an s64 is only 32-bit aligned insufficient padding would be left between the earlier elements and the timestamp. Use aligned_s64 to enforce the correct placement and ensure the storage is large enough. Fixes: 54e018d ("iio:ad7266: Mark transfer buffer as __be16") # aligned_s64 is much newer. 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-2-jic23@kernel.org Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
1 parent ffbc26b commit 52d3498

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iio/adc/ad7266.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ struct ad7266_state {
4545
*/
4646
struct {
4747
__be16 sample[2];
48-
s64 timestamp;
48+
aligned_s64 timestamp;
4949
} data __aligned(IIO_DMA_MINALIGN);
5050
};
5151

0 commit comments

Comments
 (0)