]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerJonathan Cameron <jic23@kernel.org>
Sun, 21 Jun 2015 13:03:28 +0000 (14:03 +0100)
commite6569301a318727c6974598dca0422e8f79251e3
tree01122863c0ec44fd03145cc4f13223c57f50f982
parentaaa03592d48ec0409c902e69bc5efaed55c7343f
iio: DAC: ad5624r_spi: fix bit shift of output data value

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>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/dac/ad5624r_spi.c