aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/storage/scsiglue.c
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@infradead.org>2006-01-11 09:55:29 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-03-20 17:49:55 -0500
commit4186ecf8ad16dd05759a09594de6a87e48759ba6 (patch)
tree3ee5292d9f4a36e3eb359b586289ec972bcbaf39 /drivers/usb/storage/scsiglue.c
parent35cce732d9d4d9af6b4ad4d26d8f8c0eddb573a2 (diff)
[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>
Diffstat (limited to 'drivers/usb/storage/scsiglue.c')
-rw-r--r--drivers/usb/storage/scsiglue.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c
index 4ef5527028c5..5f11e19eaae3 100644
--- a/drivers/usb/storage/scsiglue.c
+++ b/drivers/usb/storage/scsiglue.c
@@ -47,6 +47,7 @@
47 47
48#include <linux/slab.h> 48#include <linux/slab.h>
49#include <linux/module.h> 49#include <linux/module.h>
50#include <linux/mutex.h>
50 51
51#include <scsi/scsi.h> 52#include <scsi/scsi.h>
52#include <scsi/scsi_cmnd.h> 53#include <scsi/scsi_cmnd.h>
@@ -271,9 +272,9 @@ static int device_reset(struct scsi_cmnd *srb)
271 US_DEBUGP("%s called\n", __FUNCTION__); 272 US_DEBUGP("%s called\n", __FUNCTION__);
272 273
273 /* lock the device pointers and do the reset */ 274 /* lock the device pointers and do the reset */
274 down(&(us->dev_semaphore)); 275 mutex_lock(&(us->dev_mutex));
275 result = us->transport_reset(us); 276 result = us->transport_reset(us);
276 up(&(us->dev_semaphore)); 277 mutex_unlock(&us->dev_mutex);
277 278
278 return result < 0 ? FAILED : SUCCESS; 279 return result < 0 ? FAILED : SUCCESS;
279} 280}
@@ -286,9 +287,9 @@ static int bus_reset(struct scsi_cmnd *srb)
286 287
287 US_DEBUGP("%s called\n", __FUNCTION__); 288 US_DEBUGP("%s called\n", __FUNCTION__);
288 289
289 down(&(us->dev_semaphore)); 290 mutex_lock(&(us->dev_mutex));
290 result = usb_stor_port_reset(us); 291 result = usb_stor_port_reset(us);
291 up(&(us->dev_semaphore)); 292 mutex_unlock(&us->dev_mutex);
292 293
293 return result < 0 ? FAILED : SUCCESS; 294 return result < 0 ? FAILED : SUCCESS;
294} 295}