]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
iio: imu: inv_mpu6050: align buffer for timestamp
authorDavid Lechner <dlechner@baylibre.com>
Thu, 17 Apr 2025 16:52:39 +0000 (11:52 -0500)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Fri, 18 Apr 2025 15:03:34 +0000 (16:03 +0100)
Align the buffer used with iio_push_to_buffers_with_timestamp() to
ensure the s64 timestamp is aligned to 8 bytes.

Fixes: 0829edc43e0a ("iio: imu: inv_mpu6050: read the full fifo when processing data")
Signed-off-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20250417-iio-more-timestamp-alignment-v1-7-eafac1e22318@baylibre.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c

index 3d3b27f28c9d1c94aba93678261ce0d63099e1dc..273196e647a2b5a4860e18cfa34a088c773540e4 100644 (file)
@@ -50,7 +50,7 @@ irqreturn_t inv_mpu6050_read_fifo(int irq, void *p)
        u16 fifo_count;
        u32 fifo_period;
        s64 timestamp;
-       u8 data[INV_MPU6050_OUTPUT_DATA_SIZE];
+       u8 data[INV_MPU6050_OUTPUT_DATA_SIZE] __aligned(8);
        size_t i, nb;
 
        mutex_lock(&st->lock);