projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1d93353
)
iio: mcp320x: Fix occasional incorrect readings
author
Michael Welling
<mwelling@ieee.org>
Wed, 6 May 2015 16:49:17 +0000
(11:49 -0500)
committer
Jonathan Cameron
<jic23@kernel.org>
Thu, 7 May 2015 10:12:20 +0000
(11:12 +0100)
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>
drivers/iio/adc/mcp320x.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/iio/adc/mcp320x.c
b/drivers/iio/adc/mcp320x.c
index efbfd12a4bfdd9f764732d976a2650719408552c..8d9c9b9215ddc1ef5530df512d475a618cb71d8f 100644
(file)
--- 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,