提交 cd6fe065 编写于 作者: P Peter Meerwald 提交者: Jonathan Cameron

staging:iio:hmc5843: Use i2c_smbus_read_word_swapped()

Signed-off-by: NPeter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: NJonathan Cameron <jic23@kernel.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册