diff options
author | Peter Meerwald <pmeerw@pmeerw.net> | 2013-07-27 15:31:00 (GMT) |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2013-08-04 10:22:55 (GMT) |
commit | cd6fe06588423ff4cca85c85c4402027b04dccf1 (patch) | |
tree | 3d250bf8412167d78ad270d26a1371456ac12161 /drivers/staging/iio/magnetometer | |
parent | f70d6694ed48363c422595faacaa459c2e256982 (diff) | |
download | linux-cd6fe06588423ff4cca85c85c4402027b04dccf1.tar.xz |
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>
Diffstat (limited to 'drivers/staging/iio/magnetometer')
-rw-r--r-- | drivers/staging/iio/magnetometer/hmc5843.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/iio/magnetometer/hmc5843.c b/drivers/staging/iio/magnetometer/hmc5843.c index 3204593..d2748c3 100644 --- a/drivers/staging/iio/magnetometer/hmc5843.c +++ b/drivers/staging/iio/magnetometer/hmc5843.c @@ -224,12 +224,12 @@ static int hmc5843_read_measurement(struct iio_dev *indio_dev, return -EIO; } - result = i2c_smbus_read_word_data(client, address); + result = i2c_smbus_read_word_swapped(client, address); mutex_unlock(&data->lock); if (result < 0) return -EINVAL; - *val = (s16)swab16((u16)result); + *val = result; return IIO_VAL_INT; } |