iio: ltr501: ltr501_read_ps(): add missing endianness conversion
authorOliver Lang <Oliver.Lang@gossenmetrawatt.com>
Thu, 10 Jun 2021 13:46:18 +0000 (15:46 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Jul 2021 14:17:30 +0000 (16:17 +0200)
commitdc5e47b9227f15f3d973e4e822d6156aef294001
tree2dc18fbc8c2fcb7458660052b5fed4cd926d68a6
parent51c1ab060fd08f8109a0ed7602e6328d2470aadb
iio: ltr501: ltr501_read_ps(): add missing endianness conversion

commit 71b33f6f93ef9462c84560e2236ed22209d26a58 upstream.

The PS ADC Channel data is spread over 2 registers in little-endian
form. This patch adds the missing endianness conversion.

Fixes: 2690be905123 ("iio: Add Lite-On ltr501 ambient light / proximity sensor driver")
Signed-off-by: Oliver Lang <Oliver.Lang@gossenmetrawatt.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Tested-by: Nikita Travkin <nikita@trvn.ru> # ltr559
Link: https://lore.kernel.org/r/20210610134619.2101372-4-mkl@pengutronix.de
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/light/ltr501.c