]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[SCSI] aacraid: semaphore cleanup
authorThomas Gleixner <tglx@linutronix.de>
Tue, 7 Sep 2010 14:32:47 +0000 (14:32 +0000)
committerJames Bottomley <James.Bottomley@suse.de>
Fri, 17 Sep 2010 02:54:09 +0000 (22:54 -0400)
Get rid of init_MUTEX[_LOCKED]() and use sema_init() instead.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: aacraid@adaptec.com
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/aacraid/commctrl.c
drivers/scsi/aacraid/commsup.c

index 1a5bf5724750e95c269a2222ef9dc68539d5f0ee..645ddd9d9b9e1c702be4add64397f179cd2599d0 100644 (file)
@@ -190,7 +190,7 @@ static int open_getadapter_fib(struct aac_dev * dev, void __user *arg)
                /*
                 *      Initialize the mutex used to wait for the next AIF.
                 */
-               init_MUTEX_LOCKED(&fibctx->wait_sem);
+               sema_init(&fibctx->wait_sem, 0);
                fibctx->wait = 0;
                /*
                 *      Initialize the fibs and set the count of fibs on
index 70079146e203631082e7c56e308d6c89679c2523..afc9aeba5edb154ef7316552cacfa88cabc3d9a2 100644 (file)
@@ -124,7 +124,7 @@ int aac_fib_setup(struct aac_dev * dev)
                fibptr->hw_fib_va = hw_fib;
                fibptr->data = (void *) fibptr->hw_fib_va->data;
                fibptr->next = fibptr+1;        /* Forward chain the fibs */
-               init_MUTEX_LOCKED(&fibptr->event_wait);
+               sema_init(&fibptr->event_wait, 0);
                spin_lock_init(&fibptr->event_lock);
                hw_fib->header.XferState = cpu_to_le32(0xffffffff);
                hw_fib->header.SenderSize = cpu_to_le16(dev->max_fib_size);