public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: linux-omap@vger.kernel.org
Cc: Tony Lindgren <tony@atomide.com>
Subject: [PATCH 1/3] CBUS: Fix retu mutex handling
Date: Mon, 12 May 2008 17:35:16 -0700	[thread overview]
Message-ID: <1210638918-26644-2-git-send-email-tony@atomide.com> (raw)
In-Reply-To: <1210638918-26644-1-git-send-email-tony@atomide.com>

Fix retu mutex handling. Also use mutex_lock instead of unhandled
mutex_lock_interruptible.

Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 drivers/cbus/retu-wdt.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/cbus/retu-wdt.c b/drivers/cbus/retu-wdt.c
index 63194d8..85202ef 100644
--- a/drivers/cbus/retu-wdt.c
+++ b/drivers/cbus/retu-wdt.c
@@ -40,7 +40,7 @@
 #define RETU_WDT_MAX_TIMER 63
 
 static struct completion retu_wdt_completion;
-static DECLARE_MUTEX(retu_wdt_mutex);	/* Avoid simultaneous writes to watchdog register */
+static DEFINE_MUTEX(retu_wdt_mutex);
 
 static unsigned int period_val = RETU_WDT_DEFAULT_TIMER;	/* Current period of watchdog */
 static int counter_param = RETU_WDT_MAX_TIMER;
@@ -52,12 +52,12 @@ static int retu_modify_counter(unsigned int new)
 	if (new < RETU_WDT_MIN_TIMER || new > RETU_WDT_MAX_TIMER)
 		return -EINVAL;
 
-	down_interruptible(&retu_wdt_mutex);
+	mutex_lock(&retu_wdt_mutex);
 
 	period_val = new;
 	retu_write_reg(RETU_REG_WATCHDOG, (u16)period_val);
 
-	up(&retu_wdt_mutex);
+	mutex_unlock(&retu_wdt_mutex);
 	return ret;
 }
 
-- 
1.5.3.6


  reply	other threads:[~2008-05-13  0:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-13  0:35 [PATCH 0/3] Retu watchdog clean-up and fix to make it behave Tony Lindgren
2008-05-13  0:35 ` Tony Lindgren [this message]
2008-05-13  0:35   ` [PATCH 2/3] CBUS: Checkpatch.pl fixes for retu-wdt.c Tony Lindgren
2008-05-13  0:35     ` [PATCH 3/3] CBUS: Make retu watchdog behave like a standard Linux watchdog Tony Lindgren
2008-05-13  0:46       ` Igor Stoppa
2008-05-13  1:17         ` Tony Lindgren
2008-05-15 21:46           ` Tony Lindgren

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=1210638918-26644-2-git-send-email-tony@atomide.com \
    --to=tony@atomide.com \
    --cc=linux-omap@vger.kernel.org \
    /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