Commit 575a6c90 authored by Peter Meerwald's avatar Peter Meerwald Committed by Jonathan Cameron

staging:iio:hmc5843: Fix measurement conversion

recently broken, cd6fe065
staging:iio:hmc5843: Use i2c_smbus_read_word_swapped()
Signed-off-by: default avatarPeter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 5e648976
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment