diff options
author | Michael Welling <mwelling@ieee.org> | 2015-05-06 11:49:17 -0500 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2015-05-07 11:12:20 +0100 |
commit | 0e81bc99a0826db4cd2d6ba9a982579b1467a79f (patch) | |
tree | ad5c9125446f561812810fd542850fba23aad2b3 /drivers/iio/adc/mcp320x.c | |
parent | 1d93353da536d3403ac291dc96070f434f6cf285 (diff) | |
download | linux-0e81bc99a0826db4cd2d6ba9a982579b1467a79f.tar.bz2 |
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>
Diffstat (limited to 'drivers/iio/adc/mcp320x.c')
-rw-r--r-- | drivers/iio/adc/mcp320x.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/iio/adc/mcp320x.c b/drivers/iio/adc/mcp320x.c index efbfd12a4bfd..8d9c9b9215dd 100644 --- a/drivers/iio/adc/mcp320x.c +++ b/drivers/iio/adc/mcp320x.c @@ -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, |