From patchwork Sat Feb 26 23:34:33 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Buesch X-Patchwork-Id: 592861 X-Patchwork-Delegate: tony@atomide.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p1QNYghw009658 for ; Sat, 26 Feb 2011 23:34:42 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751878Ab1BZXel (ORCPT ); Sat, 26 Feb 2011 18:34:41 -0500 Received: from 80-190-117-144.ip-home.de ([80.190.117.144]:50117 "EHLO bu3sch.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751746Ab1BZXel (ORCPT ); Sat, 26 Feb 2011 18:34:41 -0500 Received: by bu3sch.de with esmtpsa (Exim 4.69) (envelope-from ) id 1PtTes-0007EK-3L; Sun, 27 Feb 2011 00:34:42 +0100 Subject: [PATCH] cbus-retu: Acquire mutex on write operation From: Michael Buesch To: Tony Lindgren Cc: linux-omap , Felipe Balbi Date: Sun, 27 Feb 2011 00:34:33 +0100 Message-ID: <1298763273.21318.5.camel@marge> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Sat, 26 Feb 2011 23:34:42 +0000 (UTC) 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);