mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-13 16:56:53 +07:00
iio: mcp320x: Fix occasional incorrect readings
Without the cacheline alignment, the readings will occasionally incorrectly return 0. Signed-off-by: Michael Welling <mwelling@ieee.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
parent
1d93353da5
commit
0e81bc99a0
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user