Skip to content

Commit

Permalink
staging:iio:hmc5843: Fix measurement conversion
Browse files Browse the repository at this point in the history
recently broken, cd6fe06
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>
  • Loading branch information
Peter Meerwald authored and Jonathan Cameron committed Sep 18, 2013
1 parent 5e64897 commit 575a6c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/iio/magnetometer/hmc5843.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 575a6c9

Please sign in to comment.