mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 15:41:52 +02:00
iio: light: 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. Acked-By: Matti Vaittinen <mazziesaccount@gmail.com> #For bu27034, rpr0521 Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20241215182912.481706-9-jic23@kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
8d7940857f
commit
a801016da0
|
|
@ -56,7 +56,7 @@ struct adjd_s311_data {
|
|||
struct i2c_client *client;
|
||||
struct {
|
||||
s16 chans[4];
|
||||
s64 ts __aligned(8);
|
||||
aligned_s64 ts;
|
||||
} scan;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -636,7 +636,7 @@ static irqreturn_t as73211_trigger_handler(int irq __always_unused, void *p)
|
|||
struct as73211_data *data = iio_priv(indio_dev);
|
||||
struct {
|
||||
__le16 chan[4];
|
||||
s64 ts __aligned(8);
|
||||
aligned_s64 ts;
|
||||
} scan;
|
||||
int data_result, ret;
|
||||
|
||||
|
|
|
|||
|
|
@ -739,7 +739,7 @@ static irqreturn_t bh1745_trigger_handler(int interrupt, void *p)
|
|||
struct bh1745_data *data = iio_priv(indio_dev);
|
||||
struct {
|
||||
u16 chans[4];
|
||||
s64 timestamp __aligned(8);
|
||||
aligned_s64 timestamp;
|
||||
} scan;
|
||||
u16 value;
|
||||
int ret;
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ struct isl29125_data {
|
|||
/* Ensure timestamp is naturally aligned */
|
||||
struct {
|
||||
u16 chans[3];
|
||||
s64 timestamp __aligned(8);
|
||||
aligned_s64 timestamp;
|
||||
} scan;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1280,7 +1280,7 @@ static irqreturn_t ltr501_trigger_handler(int irq, void *p)
|
|||
struct ltr501_data *data = iio_priv(indio_dev);
|
||||
struct {
|
||||
u16 channels[3];
|
||||
s64 ts __aligned(8);
|
||||
aligned_s64 ts;
|
||||
} scan;
|
||||
__le16 als_buf[2];
|
||||
u8 mask = 0;
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ struct max44000_data {
|
|||
/* Ensure naturally aligned timestamp */
|
||||
struct {
|
||||
u16 channels[2];
|
||||
s64 ts __aligned(8);
|
||||
aligned_s64 ts;
|
||||
} scan;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -206,7 +206,7 @@ struct bu27034_data {
|
|||
struct {
|
||||
u32 mlux;
|
||||
__le16 channels[BU27034_NUM_HW_DATA_CHANS];
|
||||
s64 ts __aligned(8);
|
||||
aligned_s64 ts;
|
||||
} scan;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ struct rpr0521_data {
|
|||
struct {
|
||||
__le16 channels[3];
|
||||
u8 garbage;
|
||||
s64 ts __aligned(8);
|
||||
aligned_s64 ts;
|
||||
} scan;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ struct st_uvis25_hw {
|
|||
/* Ensure timestamp is naturally aligned */
|
||||
struct {
|
||||
u8 chan;
|
||||
s64 ts __aligned(8);
|
||||
aligned_s64 ts;
|
||||
} scan;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ struct tcs3414_data {
|
|||
/* Ensure timestamp is naturally aligned */
|
||||
struct {
|
||||
u16 chans[4];
|
||||
s64 timestamp __aligned(8);
|
||||
aligned_s64 timestamp;
|
||||
} scan;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ struct tcs3472_data {
|
|||
/* Ensure timestamp is naturally aligned */
|
||||
struct {
|
||||
u16 chans[4];
|
||||
s64 timestamp __aligned(8);
|
||||
aligned_s64 timestamp;
|
||||
} scan;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user