[ Upstream commit
ffcd19e9f4cca0c8f9e23e88f968711acefbb37b ]
Follow the pattern of other drivers and use aligned_s64 for the
timestamp. This will ensure the struct itself it also 8-byte aligned.
While touching this, convert struct mpr_chan to an anonymous struct
to consolidate the code a bit to make it easier for future readers.
Fixes: 713337d9143e ("iio: pressure: Honeywell mprls0025pa pressure sensor")
Signed-off-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20250418-iio-more-timestamp-alignment-v2-2-d6a5d2b1c9fe@baylibre.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
[ Applied changes to mprls0025pa.c ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[MPR_FUNCTION_C] = {.output_min = 3355443, .output_max = 13421773},
};
-struct mpr_chan {
- s32 pres; /* pressure value */
- s64 ts; /* timestamp */
-};
-
struct mpr_data {
struct i2c_client *client;
struct mutex lock; /*
* loop until data is ready
*/
struct completion completion; /* handshake from irq to read */
- struct mpr_chan chan; /*
+ struct {
+ s32 pres; /* pressure value */
+ aligned_s64 ts; /* timestamp */
+ } chan; /*
* channel values for buffered
* mode
*/