linux/drivers/staging/iio
David Schiller c794117a33 staging: iio: ad5933: fix type mismatch regression
commit 6db053cd94 upstream.

Commit 4c3577db3e ("Staging: iio: impedance-analyzer: Fix sparse
warning") fixed a compiler warning, but introduced a bug that resulted
in one of the two 16 bit IIO channels always being zero (when both are
enabled).

This is because int is 32 bits wide on most architectures and in the
case of a little-endian machine the two most significant bytes would
occupy the buffer for the second channel as 'val' is being passed as a
void pointer to 'iio_push_to_buffers()'.

Fix by defining 'val' as u16. Tested working on ARM64.

Fixes: 4c3577db3e ("Staging: iio: impedance-analyzer: Fix sparse warning")
Signed-off-by: David Schiller <david.schiller@jku.at>
Link: https://lore.kernel.org/r/20240122134916.2137957-1-david.schiller@jku.at
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2024-02-23 09:12:40 +01:00
..
accel iio:imu:adis: Move exports into IIO_ADISLIB namespace 2022-02-18 11:42:26 +00:00
adc iio:adc:ad7280a: Move out of staging 2022-02-21 19:33:05 +00:00
addac staging: iio: fix some formatting issues 2021-05-19 17:59:29 +02:00
Documentation staging:iio:documentation: Drop most generic docs 2020-09-16 19:12:00 +01:00
frequency staging: iio: frequency: ad9832: Fix alignment for DMA safety 2022-08-20 12:54:43 +01:00
impedance-analyzer staging: iio: ad5933: fix type mismatch regression 2024-02-23 09:12:40 +01:00
meter staging: iio: meter: ade7854: Fix alignment for DMA safety 2022-08-15 22:30:01 +01:00
resolver staging: iio: resolver: ads1210: fix config mode 2023-05-11 23:03:01 +09:00
Kconfig iio: cdc: ad7746: Move driver out of staging. 2022-08-15 22:30:01 +01:00
Makefile iio: cdc: ad7746: Move driver out of staging. 2022-08-15 22:30:01 +01:00
TODO staging: iio: remove mention of defunct list 2021-03-25 19:13:49 +00:00