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)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 12 Aug 2015 14:33:16 +0000 (16:33 +0200)
commit834d2db3c439d2ad60bd6625cbe1ae95979d2bff
tree592b856e81e1abfc44a72992f7224b4158ff4f79
parent5dedaea4936981382ec0d9833ad372ebd3d8af57
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>
[bwh: Backported to 3.2: adjust filename]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/staging/iio/dac/ad5624r_spi.c