]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
iio: imu: inv_icm42600: switch timestamp type from int64_t __aligned(8) to aligned_s64
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 24 Aug 2025 13:53:24 +0000 (09:53 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:28:47 +0000 (16:28 +0200)
[ Upstream commit 27e6ddf291b1c05bfcc3534e8212ed6c46447c60 ]

The vast majority of IIO drivers use aligned_s64 for the type of the
timestamp field.  It is not a bug to use int64_t and until this series
iio_push_to_buffers_with_timestamp() took and int64_t timestamp, it
is inconsistent.  This change is to remove that inconsistency and
ensure there is one obvious choice for future drivers.

Acked-by: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20241215182912.481706-19-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Stable-dep-of: dfdc31e7ccf3 ("iio: imu: inv_icm42600: change invalid data error to -EBUSY")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/imu/inv_icm42600/inv_icm42600_accel.c
drivers/iio/imu/inv_icm42600/inv_icm42600_gyro.c

index 47720560de6e033493bbdd53cff42b86765cfcb9..6f44c03bbe5ae15303039b0047f1792ce84cc50c 100644 (file)
@@ -78,7 +78,7 @@ static const struct iio_chan_spec inv_icm42600_accel_channels[] = {
 struct inv_icm42600_accel_buffer {
        struct inv_icm42600_fifo_sensor_data accel;
        int16_t temp;
-       int64_t timestamp __aligned(8);
+       aligned_s64 timestamp;
 };
 
 #define INV_ICM42600_SCAN_MASK_ACCEL_3AXIS                             \
index d08cd6839a3a674d1bea981f376bd10d4a44ae46..94f712c306087dddf622d3684e9dedb6976b9399 100644 (file)
@@ -78,7 +78,7 @@ static const struct iio_chan_spec inv_icm42600_gyro_channels[] = {
 struct inv_icm42600_gyro_buffer {
        struct inv_icm42600_fifo_sensor_data gyro;
        int16_t temp;
-       int64_t timestamp __aligned(8);
+       aligned_s64 timestamp;
 };
 
 #define INV_ICM42600_SCAN_MASK_GYRO_3AXIS                              \