summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid Schiller <david.schiller@jku.at>2024-01-22 14:49:17 +0100
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2024-01-27 16:00:02 +0000
commit6db053cd949fcd6254cea9f2cd5d39f7bd64379c (patch)
tree0cc12a8ad3142ec3eb04704f889706ab21012ca9 /include
parenta69eeaad093dd2c8fd0b216c8143b380b73d672d (diff)
downloadlinux-stable-6db053cd949fcd6254cea9f2cd5d39f7bd64379c.tar.gz
linux-stable-6db053cd949fcd6254cea9f2cd5d39f7bd64379c.tar.bz2
linux-stable-6db053cd949fcd6254cea9f2cd5d39f7bd64379c.zip
staging: iio: ad5933: fix type mismatch regression
Commit 4c3577db3e4f ("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: 4c3577db3e4f ("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>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions