diff options
author | Peter Meerwald <pmeerw@pmeerw.net> | 2013-09-02 21:05:00 -0400 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2013-09-18 14:43:30 -0400 |
commit | 575a6c90c190efabc829a8a9109f5036edaf1a82 (patch) | |
tree | abce5e3b72979f0eb2b4db94f128f1974f8124f3 | |
parent | 5e64897638169d13f1637eecdaf8cb8512c4a3a1 (diff) |
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, | |||
229 | if (result < 0) | 229 | if (result < 0) |
230 | return -EINVAL; | 230 | return -EINVAL; |
231 | 231 | ||
232 | *val = result; | 232 | *val = sign_extend32(result, 15); |
233 | return IIO_VAL_INT; | 233 | return IIO_VAL_INT; |
234 | } | 234 | } |
235 | 235 | ||