]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
iio: hid-sensor: Use aligned data type for timestamp
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 3 Sep 2024 17:59:06 +0000 (20:59 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 30 Sep 2024 08:20:59 +0000 (09:20 +0100)
Use aligned_s64 for the timestamp field.

Note, the actual data is signed, hence with this we also amend that.
While at it, drop redundant __alignment directive.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20240903180218.3640501-4-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/accel/hid-sensor-accel-3d.c
drivers/iio/gyro/hid-sensor-gyro-3d.c
drivers/iio/humidity/hid-sensor-humidity.c
drivers/iio/light/hid-sensor-als.c
drivers/iio/orientation/hid-sensor-incl-3d.c
drivers/iio/orientation/hid-sensor-rotation.c
drivers/iio/position/hid-sensor-custom-intel-hinge.c
drivers/iio/pressure/hid-sensor-press.c
drivers/iio/temperature/hid-sensor-temperature.c

index 9b7a73a4c48a520e6c65388006c2df17f1608c8d..431a12171504689180a3ca01fc4eae434b338f20 100644 (file)
@@ -28,7 +28,7 @@ struct accel_3d_state {
        /* Ensure timestamp is naturally aligned */
        struct {
                u32 accel_val[3];
-               s64 timestamp __aligned(8);
+               aligned_s64 timestamp;
        } scan;
        int scale_pre_decml;
        int scale_post_decml;
index 59a38bf9459bd0450e93f863118b9954a7020b7a..d6562bd425f23036de339607d845231679c28e8d 100644 (file)
@@ -27,7 +27,7 @@ struct gyro_3d_state {
        struct hid_sensor_hub_attribute_info gyro[GYRO_3D_CHANNEL_MAX];
        struct {
                u32 gyro_val[GYRO_3D_CHANNEL_MAX];
-               u64 timestamp __aligned(8);
+               aligned_s64 timestamp;
        } scan;
        int scale_pre_decml;
        int scale_post_decml;
index bf6d2636a85e7c343e1ec37bba5554b050093e86..eb1c022f73c8ba20831cb01deeb4f078ea5c2c92 100644 (file)
@@ -18,7 +18,7 @@ struct hid_humidity_state {
        struct hid_sensor_hub_attribute_info humidity_attr;
        struct {
                s32 humidity_data;
-               u64 timestamp __aligned(8);
+               aligned_s64 timestamp;
        } scan;
        int scale_pre_decml;
        int scale_post_decml;
index 260281194f61324e6fa20a6cb96851db68de115a..0c1d97aecd71bd051a18bd1c6b85a78c20a16f5c 100644 (file)
@@ -31,7 +31,7 @@ struct als_state {
        struct iio_chan_spec channels[CHANNEL_SCAN_INDEX_MAX + 1];
        struct {
                u32 illum[CHANNEL_SCAN_INDEX_MAX];
-               u64 timestamp __aligned(8);
+               aligned_s64 timestamp;
        } scan;
        int scale_pre_decml;
        int scale_post_decml;
index 8943d5c78bc07383bc988f50a4c8fd1f3fae073d..f5e5fb68caf8ebc378b20dc72de1c1ac0244268f 100644 (file)
@@ -29,7 +29,7 @@ struct incl_3d_state {
        struct hid_sensor_hub_attribute_info incl[INCLI_3D_CHANNEL_MAX];
        struct {
                u32 incl_val[INCLI_3D_CHANNEL_MAX];
-               u64 timestamp __aligned(8);
+               aligned_s64 timestamp;
        } scan;
        int scale_pre_decml;
        int scale_post_decml;
index 5e8cadd5177ae7fa56f42cd93f9c6a92a219dbff..501c312ce752fd36f97f3d642b2b8f5b8f32b233 100644 (file)
@@ -20,7 +20,7 @@ struct dev_rot_state {
        struct hid_sensor_hub_attribute_info quaternion;
        struct {
                s32 sampled_vals[4] __aligned(16);
-               u64 timestamp __aligned(8);
+               aligned_s64 timestamp;
        } scan;
        int scale_pre_decml;
        int scale_post_decml;
index 76e173850a35496d14c3519970a461b512120865..6239e2f72a05f6d164440b6edb79cabd6442c911 100644 (file)
@@ -39,7 +39,7 @@ struct hinge_state {
        const char *labels[CHANNEL_SCAN_INDEX_MAX];
        struct {
                u32 hinge_val[3];
-               u64 timestamp __aligned(8);
+               aligned_s64 timestamp;
        } scan;
 
        int scale_pre_decml;
index 956045e2db293c541f0559d082f8e8a76c38ff9d..0419bb3c34945dcff57f7607470d465bee678785 100644 (file)
@@ -24,7 +24,7 @@ struct press_state {
        struct hid_sensor_hub_attribute_info press_attr;
        struct {
                u32 press_data;
-               u64 timestamp __aligned(8);
+               aligned_s64 timestamp;
        } scan;
        int scale_pre_decml;
        int scale_post_decml;
index 0143fd478933cc6ceea383bb9b2095c95d096b95..d2209cd5b98c74bc4449a9766b1b515bf2203ab3 100644 (file)
@@ -18,7 +18,7 @@ struct temperature_state {
        struct hid_sensor_hub_attribute_info temperature_attr;
        struct {
                s32 temperature_data;
-               u64 timestamp __aligned(8);
+               aligned_s64 timestamp;
        } scan;
        int scale_pre_decml;
        int scale_post_decml;