diff mbox

cbus-retu: Acquire mutex on write operation

Message ID 1298763273.21318.5.camel@marge (mailing list archive)
State Accepted
Commit 8ac8b596206294065074492e5460e20c1b8a1e98
Delegated to: Tony Lindgren
Headers show

Commit Message

Michael Buesch Feb. 26, 2011, 11:34 p.m. UTC
None
diff mbox

Patch

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);