]> git.karo-electronics.de Git - linux-beck.git/commitdiff
IB/umad: Make user_mad semaphore a real one
authorThomas Gleixner <tglx@linutronix.de>
Tue, 7 Sep 2010 14:33:31 +0000 (14:33 +0000)
committerRoland Dreier <rolandd@cisco.com>
Wed, 29 Sep 2010 03:52:21 +0000 (20:52 -0700)
Get rid of init_MUTEX[_LOCKED]() and use sema_init() instead.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/core/user_mad.c

index 5fa856909511248c01bb925166bb592e8e94a0e4..cd1996d0ad089950960ba8bb3f4eaa0bff24f7fe 100644 (file)
@@ -1022,7 +1022,7 @@ static int ib_umad_init_port(struct ib_device *device, int port_num,
 
        port->ib_dev   = device;
        port->port_num = port_num;
-       init_MUTEX(&port->sm_sem);
+       sema_init(&port->sm_sem, 1);
        mutex_init(&port->file_mutex);
        INIT_LIST_HEAD(&port->file_list);