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:
parent
5e64897638
commit
575a6c90c1
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue