mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-10-23 07:23:12 +02:00
iio: proximity: Use aligned_s64 instead of open coding alignment.
Use this new type to both slightly simplify the code and avoid confusing static analysis tools. Mostly this series is about consistency to avoid this code pattern getting copied into more drivers. Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20241215182912.481706-6-jic23@kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
bfca85fa96
commit
8ee2a74eff
|
|
@ -63,7 +63,7 @@ struct as3935_state {
|
|||
/* Ensure timestamp is naturally aligned */
|
||||
struct {
|
||||
u8 chan;
|
||||
s64 timestamp __aligned(8);
|
||||
aligned_s64 timestamp;
|
||||
} scan;
|
||||
u8 buf[2] __aligned(IIO_DMA_MINALIGN);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ struct hx9023s_data {
|
|||
|
||||
struct {
|
||||
__le16 channels[HX9023S_CH_NUM];
|
||||
s64 ts __aligned(8);
|
||||
aligned_s64 ts;
|
||||
} buffer;
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ struct mb1232_data {
|
|||
/* Ensure correct alignment of data to push to IIO buffer */
|
||||
struct {
|
||||
s16 distance;
|
||||
s64 ts __aligned(8);
|
||||
aligned_s64 ts;
|
||||
} scan;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ struct lidar_data {
|
|||
/* Ensure timestamp is naturally aligned */
|
||||
struct {
|
||||
u16 chan;
|
||||
s64 timestamp __aligned(8);
|
||||
aligned_s64 timestamp;
|
||||
} scan;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ struct srf08_data {
|
|||
/* Ensure timestamp is naturally aligned */
|
||||
struct {
|
||||
s16 chan;
|
||||
s64 timestamp __aligned(8);
|
||||
aligned_s64 timestamp;
|
||||
} scan;
|
||||
|
||||
/* Sensor-Type */
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ struct sx_common_data {
|
|||
/* Ensure correct alignment of timestamp when present. */
|
||||
struct {
|
||||
__be16 channels[SX_COMMON_MAX_NUM_CHANNELS];
|
||||
s64 ts __aligned(8);
|
||||
aligned_s64 ts;
|
||||
} buffer;
|
||||
|
||||
unsigned int suspend_ctrl;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user