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>
This commit is contained in:
Peter Meerwald 2013-07-27 16:31:00 +01:00 committed by Jonathan Cameron
parent f70d6694ed
commit cd6fe06588
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}