提交 0e81bc99 编写于 作者: M Michael Welling 提交者: Jonathan Cameron

iio: mcp320x: Fix occasional incorrect readings

Without the cacheline alignment, the readings will occasionally incorrectly
return 0.
Signed-off-by: NMichael Welling <mwelling@ieee.org>
Signed-off-by: NJonathan Cameron <jic23@kernel.org>
上级 1d93353d
......@@ -60,12 +60,12 @@ struct mcp320x {
struct spi_message msg;
struct spi_transfer transfer[2];
u8 tx_buf;
u8 rx_buf[2];
struct regulator *reg;
struct mutex lock;
const struct mcp320x_chip_info *chip_info;
u8 tx_buf ____cacheline_aligned;
u8 rx_buf[2];
};
static int mcp320x_channel_to_tx_data(int device_index,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册