iio: humidity: 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-11-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
Jonathan Cameron 2024-12-15 18:29:01 +00:00
parent f3477faedf
commit 15fd16d296
3 changed files with 3 additions and 3 deletions

View file

@ -35,7 +35,7 @@ struct am2315_data {
/* Ensure timestamp is naturally aligned */ /* Ensure timestamp is naturally aligned */
struct { struct {
s16 chans[2]; s16 chans[2];
s64 timestamp __aligned(8); aligned_s64 timestamp;
} scan; } scan;
}; };

View file

@ -44,7 +44,7 @@ struct hdc100x_data {
/* Ensure natural alignment of timestamp */ /* Ensure natural alignment of timestamp */
struct { struct {
__be16 channels[2]; __be16 channels[2];
s64 ts __aligned(8); aligned_s64 ts;
} scan; } scan;
}; };

View file

@ -40,7 +40,7 @@ struct hts221_hw {
/* Ensure natural alignment of timestamp */ /* Ensure natural alignment of timestamp */
struct { struct {
__le16 channels[2]; __le16 channels[2];
s64 ts __aligned(8); aligned_s64 ts;
} scan; } scan;
}; };