diff options
author | Peter Meerwald <pmeerw@pmeerw.net> | 2013-09-03 02:05:00 +0100 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2013-09-18 19:43:30 +0100 |
commit | 575a6c90c190efabc829a8a9109f5036edaf1a82 (patch) | |
tree | abce5e3b72979f0eb2b4db94f128f1974f8124f3 | |
parent | 5e64897638169d13f1637eecdaf8cb8512c4a3a1 (diff) | |
download | linux-stable-575a6c90c190efabc829a8a9109f5036edaf1a82.tar.gz linux-stable-575a6c90c190efabc829a8a9109f5036edaf1a82.tar.bz2 linux-stable-575a6c90c190efabc829a8a9109f5036edaf1a82.zip |
staging:iio:hmc5843: Fix measurement conversion
recently broken, cd6fe06588423ff4cca85c85c4402027b04dccf1
staging:iio:hmc5843: Use i2c_smbus_read_word_swapped()
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-rw-r--r-- | drivers/staging/iio/magnetometer/hmc5843.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/iio/magnetometer/hmc5843.c b/drivers/staging/iio/magnetometer/hmc5843.c index d2748c329eae..c3f3f539e787 100644 --- a/drivers/staging/iio/magnetometer/hmc5843.c +++ b/drivers/staging/iio/magnetometer/hmc5843.c @@ -229,7 +229,7 @@ static int hmc5843_read_measurement(struct iio_dev *indio_dev, if (result < 0) return -EINVAL; - *val = result; + *val = sign_extend32(result, 15); return IIO_VAL_INT; } |