From: Michael Buesch <mb@bu3sch.de>
To: Tony Lindgren <tony@atomide.com>
Cc: linux-omap <linux-omap@vger.kernel.org>, Felipe Balbi <balbi@ti.com>
Subject: [PATCH] cbus-retu: Acquire mutex on write operation
Date: Sun, 27 Feb 2011 00:34:33 +0100 [thread overview]
Message-ID: <1298763273.21318.5.camel@marge> (raw)
The mutex has to be acquired on register write to avoid interference
with a simultaneous retu_set_clear_reg_bits operation.
Signed-off-by: Michael Buesch <mb@bu3sch.de>
---
Tested on n810.
Index: linux-omap-2.6/drivers/cbus/retu.c
===================================================================
--- linux-omap-2.6.orig/drivers/cbus/retu.c 2011-02-23 23:32:26.388763324 +0100
+++ linux-omap-2.6/drivers/cbus/retu.c 2011-02-26 23:27:08.772462280 +0100
@@ -120,7 +120,9 @@
{
struct retu *retu = dev_get_drvdata(child->parent);
+ mutex_lock(&retu->mutex);
__retu_write_reg(retu, reg, val);
+ mutex_unlock(&retu->mutex);
}
EXPORT_SYMBOL_GPL(retu_write_reg);
next reply other threads:[~2011-02-26 23:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-26 23:34 Michael Buesch [this message]
2011-02-28 8:33 ` [PATCH] cbus-retu: Acquire mutex on write operation Felipe Balbi
2011-02-28 14:10 ` Michael Büsch
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=1298763273.21318.5.camel@marge \
--to=mb@bu3sch.de \
--cc=balbi@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=tony@atomide.com \
/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