Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0e81bc99 authored by Michael Welling's avatar Michael Welling Committed by Jonathan Cameron
Browse files

iio: mcp320x: Fix occasional incorrect readings



Without the cacheline alignment, the readings will occasionally incorrectly
return 0.

Signed-off-by: default avatarMichael Welling <mwelling@ieee.org>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 1d93353d
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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,