[PATCH] USB: convert a bunch of USB semaphores to mutexes

the patch below converts a bunch of semaphores-used-as-mutex in the USB
code to mutexes

Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
此提交包含在:
Arjan van de Ven
2006-01-11 15:55:29 +01:00
提交者 Greg Kroah-Hartman
父節點 35cce732d9
當前提交 4186ecf8ad
共有 34 個檔案被更改,包括 389 行新增372 行删除

查看文件

@@ -47,6 +47,7 @@
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <scsi/scsi.h>
#include <scsi/scsi_cmnd.h>
@@ -271,9 +272,9 @@ static int device_reset(struct scsi_cmnd *srb)
US_DEBUGP("%s called\n", __FUNCTION__);
/* lock the device pointers and do the reset */
down(&(us->dev_semaphore));
mutex_lock(&(us->dev_mutex));
result = us->transport_reset(us);
up(&(us->dev_semaphore));
mutex_unlock(&us->dev_mutex);
return result < 0 ? FAILED : SUCCESS;
}
@@ -286,9 +287,9 @@ static int bus_reset(struct scsi_cmnd *srb)
US_DEBUGP("%s called\n", __FUNCTION__);
down(&(us->dev_semaphore));
mutex_lock(&(us->dev_mutex));
result = usb_stor_port_reset(us);
up(&(us->dev_semaphore));
mutex_unlock(&us->dev_mutex);
return result < 0 ? FAILED : SUCCESS;
}