mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
iio: gyro: 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-12-jic23@kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
15fd16d296
commit
5532cd9d1d
4 changed files with 4 additions and 4 deletions
|
@ -75,7 +75,7 @@ struct adxrs290_state {
|
|||
/* Ensure correct alignment of timestamp when present */
|
||||
struct {
|
||||
s16 channels[3];
|
||||
s64 ts __aligned(8);
|
||||
aligned_s64 ts;
|
||||
} buffer;
|
||||
};
|
||||
|
||||
|
|
|
@ -99,7 +99,7 @@ struct bmg160_data {
|
|||
/* Ensure naturally aligned timestamp */
|
||||
struct {
|
||||
s16 chans[3];
|
||||
s64 timestamp __aligned(8);
|
||||
aligned_s64 timestamp;
|
||||
} scan;
|
||||
u32 dps_range;
|
||||
int ev_enable_state;
|
||||
|
|
|
@ -52,7 +52,7 @@ static irqreturn_t itg3200_trigger_handler(int irq, void *p)
|
|||
*/
|
||||
struct {
|
||||
__be16 buf[ITG3200_SCAN_ELEMENTS];
|
||||
s64 ts __aligned(8);
|
||||
aligned_s64 ts;
|
||||
} scan;
|
||||
|
||||
int ret = itg3200_read_all_channels(st->i2c, scan.buf);
|
||||
|
|
|
@ -474,7 +474,7 @@ static irqreturn_t mpu3050_trigger_handler(int irq, void *p)
|
|||
int ret;
|
||||
struct {
|
||||
__be16 chans[4];
|
||||
s64 timestamp __aligned(8);
|
||||
aligned_s64 timestamp;
|
||||
} scan;
|
||||
s64 timestamp;
|
||||
unsigned int datums_from_fifo = 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue