summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Meerwald <pmeerw@pmeerw.net>2013-07-27 16:31:00 +0100
committerJonathan Cameron <jic23@kernel.org>2013-08-04 11:22:55 +0100
commitcd6fe06588423ff4cca85c85c4402027b04dccf1 (patch)
tree3d250bf8412167d78ad270d26a1371456ac12161
parentf70d6694ed48363c422595faacaa459c2e256982 (diff)
staging:iio:hmc5843: Use i2c_smbus_read_word_swapped()iio-for-3.12a
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-rw-r--r--drivers/staging/iio/magnetometer/hmc5843.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/iio/magnetometer/hmc5843.c b/drivers/staging/iio/magnetometer/hmc5843.c
index 3204593c90d4..d2748c329eae 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;
}