]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iio: imu: bno055: add explicit scan buf layout
authorDavid Lechner <dlechner@baylibre.com>
Sat, 14 Mar 2026 21:38:25 +0000 (16:38 -0500)
committerJonathan Cameron <jic23@kernel.org>
Mon, 27 Apr 2026 08:58:16 +0000 (09:58 +0100)
commit5de55ae1300b4bd70eb39b6664b6c733eee08228
tree6b92c06f7c80957090da72c48738508657d75bc2
parentd05e3c1460e47aa61e58cc6947cf7c9fc1371d7e
iio: imu: bno055: add explicit scan buf layout

Move the scan buf.chans array into a union along with a struct that
gives the layout of the buffer with all channels enabled.

Although not technically required in this case, if there had been a
different number of items before the quaternion, there could have been
a subtle bug with the special alignment needed for the quaternion
channel data and the array would have been too small.

Signed-off-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/imu/bno055/bno055.c