mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
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:
parent
f3477faedf
commit
15fd16d296
3 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue