Commit cd6fe065 authored by Peter Meerwald's avatar Peter Meerwald Committed by Jonathan Cameron

staging:iio:hmc5843: Use i2c_smbus_read_word_swapped()

Signed-off-by: default avatarPeter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent f70d6694
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment