iio: pressure: zpa2326: Use aligned_s64 for the timestamp
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 13 Apr 2025 10:34:41 +0000 (11:34 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 21 May 2025 13:20:27 +0000 (14:20 +0100)
On x86_32 s64 fields are only 32-bit aligned.  Hence force the alignment of
the field and padding in the structure by using aligned_s64 instead.

Reviewed-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20250413103443.2420727-19-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/pressure/zpa2326.c

index 0a510d5fc1d40ef1e13fff4afd09b2cf6daa62a0..30f007794f5b5ff9598023480a8f2fb6d75841a3 100644 (file)
@@ -582,7 +582,7 @@ static int zpa2326_fill_sample_buffer(struct iio_dev               *indio_dev,
        struct {
                u32 pressure;
                u16 temperature;
-               u64 timestamp;
+               aligned_s64 timestamp;
        }   sample;
        int err;