iio: pressure: 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 the BD1390
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20241215182912.481706-7-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
pull/1134/merge
Jonathan Cameron 2024-12-15 18:28:57 +00:00
parent 8ee2a74eff
commit adfaea544e
3 changed files with 3 additions and 3 deletions

View File

@ -58,7 +58,7 @@ struct hsc_data {
s32 p_offset_dec;
struct {
__be16 chan[2];
s64 timestamp __aligned(8);
aligned_s64 timestamp;
} scan;
u8 buffer[HSC_REG_MEASUREMENT_RD_SIZE] __aligned(IIO_DMA_MINALIGN);
};

View File

@ -213,7 +213,7 @@ static irqreturn_t ms5611_trigger_handler(int irq, void *p)
/* Ensure buffer elements are naturally aligned */
struct {
s32 channels[2];
s64 ts __aligned(8);
aligned_s64 ts;
} scan;
int ret;

View File

@ -139,7 +139,7 @@ enum {
struct bm1390_data_buf {
u32 pressure;
__be16 temp;
s64 ts __aligned(8);
aligned_s64 ts;
};
/* BM1390 has FIFO for 4 pressure samples */