WSL2-Linux-Kernel/drivers/iio/imu/inv_icm42600
Alexandru Ardelean 17395ce299 iio: make use of devm_iio_kfifo_buffer_setup() helper
All drivers that already call devm_iio_kfifo_allocate() &
iio_device_attach_buffer() are simple to convert to
iio_device_attach_kfifo_buffer() in a single go.

This change does that; the unwind order is preserved.
What is important, is that the devm_iio_kfifo_buffer_setup() be called
after the indio_dev->modes is assigned, to make sure that
INDIO_BUFFER_SOFTWARE flag is set and not overridden by the assignment to
indio_dev->modes.

Also, the INDIO_BUFFER_SOFTWARE has been removed from the assignments of
'indio_dev->modes' because it is set by devm_iio_kfifo_buffer_setup().

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-by: Matt Ranostay <matt.ranostay@konsulko.com>x
Link: https://lore.kernel.org/r/20210215104043.91251-4-alexandru.ardelean@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2021-03-11 20:47:01 +00:00
..
Kconfig iio: imu: inv_icm42600: add buffer support in iio devices 2020-06-27 14:23:18 +01:00
Makefile iio: imu: inv_icm42600: add accurate timestamping 2020-06-27 14:24:42 +01:00
inv_icm42600.h iio: imu: inv_icm42600: add accurate timestamping 2020-06-27 14:24:42 +01:00
inv_icm42600_accel.c iio: make use of devm_iio_kfifo_buffer_setup() helper 2021-03-11 20:47:01 +00:00
inv_icm42600_buffer.c iio: imu: inv_icm42600: add accurate timestamping 2020-06-27 14:24:42 +01:00
inv_icm42600_buffer.h iio: imu: inv_icm42600: add buffer support in iio devices 2020-06-27 14:23:18 +01:00
inv_icm42600_core.c iio: imu: inv_icm42600: add accurate timestamping 2020-06-27 14:24:42 +01:00
inv_icm42600_gyro.c iio: make use of devm_iio_kfifo_buffer_setup() helper 2021-03-11 20:47:01 +00:00
inv_icm42600_i2c.c iio: imu: inv_icm42600: add device interrupt 2020-06-27 14:21:45 +01:00
inv_icm42600_spi.c iio: imu: inv_icm42600: add device interrupt 2020-06-27 14:21:45 +01:00
inv_icm42600_temp.c iio: imu: inv_icm42600: add temperature sensor support 2020-06-27 14:20:16 +01:00
inv_icm42600_temp.h iio: imu: inv_icm42600: add temperature sensor support 2020-06-27 14:20:16 +01:00
inv_icm42600_timestamp.c iio: imu: inv_icm42600: add accurate timestamping 2020-06-27 14:24:42 +01:00
inv_icm42600_timestamp.h iio: imu: inv_icm42600: add accurate timestamping 2020-06-27 14:24:42 +01:00