lkml.org 
[lkml]   [2010]   [Oct]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[tip:core/locking] net: Wan/cosa.c: Convert "mutex" to semaphore
Commit-ID:  d1985508320ad40a68375bdbafa8a5d6c56d2114
Gitweb: http://git.kernel.org/tip/d1985508320ad40a68375bdbafa8a5d6c56d2114
Author: Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Tue, 7 Sep 2010 14:32:25 +0000
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Tue, 12 Oct 2010 17:36:09 +0200

net: Wan/cosa.c: Convert "mutex" to semaphore

Get rid of init_MUTEX[_LOCKED]() and use sema_init() instead.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Christoph Hellwig <hch@infradead.org>
Acked-by: "David S. Miller" <davem@davemloft.net>
LKML-Reference: <20100907125055.557578360@linutronix.de>

---
drivers/net/wan/cosa.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wan/cosa.c b/drivers/net/wan/cosa.c
index 04c6cd4..10bafd5 100644
--- a/drivers/net/wan/cosa.c
+++ b/drivers/net/wan/cosa.c
@@ -575,7 +575,7 @@ static int cosa_probe(int base, int irq, int dma)

/* Initialize the chardev data structures */
mutex_init(&chan->rlock);
- init_MUTEX(&chan->wsem);
+ sema_init(&chan->wsem, 1);

/* Register the network interface */
if (!(chan->netdev = alloc_hdlcdev(chan))) {

\
 
 \ /
  Last update: 2010-10-12 17:55    [W:0.570 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site