staging:iio:hmc5843: Fix measurement conversion

recently broken, cd6fe06588
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>
This commit is contained in:
Peter Meerwald 2013-09-03 02:05:00 +01:00 committed by Jonathan Cameron
parent 5e64897638
commit 575a6c90c1
1 changed files with 1 additions and 1 deletions

View File

@ -229,7 +229,7 @@ static int hmc5843_read_measurement(struct iio_dev *indio_dev,
if (result < 0) if (result < 0)
return -EINVAL; return -EINVAL;
*val = result; *val = sign_extend32(result, 15);
return IIO_VAL_INT; return IIO_VAL_INT;
} }