From: Peter Meerwald Date: Sat, 27 Jul 2013 15:31:00 +0000 (+0100) Subject: staging:iio:hmc5843: Use i2c_smbus_read_word_swapped() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=cd6fe06588423ff4cca85c85c4402027b04dccf1;p=openwrt%2Fstaging%2Fblogic.git staging:iio:hmc5843: Use i2c_smbus_read_word_swapped() Signed-off-by: Peter Meerwald Signed-off-by: Jonathan Cameron --- 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; }