iio: DAC: ad5624r_spi: fix bit shift of output data value
authorJM Friedt <jmfriedt@femto-st.fr>
Fri, 19 Jun 2015 12:48:06 +0000 (14:48 +0200)
committerDanny Wood <danwood76@gmail.com>
Tue, 29 Jan 2019 13:09:14 +0000 (13:09 +0000)
commit69e1e660201f7703dff48dd63a195c2cd2d32adb
treefbdbe9a769e6a01db184a3f5551134dcf47241e8
parentb86034eebedabfae698fde495fd2d770eb3ec6b4
iio: DAC: ad5624r_spi: fix bit shift of output data value

commit adfa969850ae93beca57f7527f0e4dc10cbe1309 upstream.

The value sent on the SPI bus is shifted by an erroneous number of bits.
The shift value was already computed in the iio_chan_spec structure and
hence subtracting this argument to 16 yields an erroneous data position
in the SPI stream.

Signed-off-by: JM Friedt <jmfriedt@femto-st.fr>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/dac/ad5624r_spi.c