From: Michael Welling <mwelling@ieee.org>
To: jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de,
pmeerw@pmeerw.net, san@rosetechnology.dk,
linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org
Cc: Michael Welling <mwelling@ieee.org>
Subject: [PATCH] iio: mcp320x: Fix occasional incorrect readings
Date: Tue, 5 May 2015 11:29:55 -0500 [thread overview]
Message-ID: <1430843395-19446-1-git-send-email-mwelling@ieee.org> (raw)
Without the cacheline alignment, the readings will occasionally incorrectly
return 0.
Signed-off-by: Michael Welling <mwelling@ieee.org>
---
drivers/iio/adc/mcp320x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/adc/mcp320x.c b/drivers/iio/adc/mcp320x.c
index efbfd12..46b98cf 100644
--- a/drivers/iio/adc/mcp320x.c
+++ b/drivers/iio/adc/mcp320x.c
@@ -60,7 +60,7 @@ struct mcp320x {
struct spi_message msg;
struct spi_transfer transfer[2];
- u8 tx_buf;
+ u8 tx_buf ____cacheline_aligned;
u8 rx_buf[2];
struct regulator *reg;
--
1.7.9.5
next reply other threads:[~2015-05-05 16:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-05 16:29 Michael Welling [this message]
2015-05-05 17:29 ` [PATCH] iio: mcp320x: Fix occasional incorrect readings Lars-Peter Clausen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1430843395-19446-1-git-send-email-mwelling@ieee.org \
--to=mwelling@ieee.org \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
--cc=san@rosetechnology.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox