diff options
author | Jes Sorensen <jes@sgi.com> | 2006-03-23 03:00:22 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-23 07:38:10 -0800 |
commit | e723ccd805857a46d3b63fbd20edea8579c6c541 (patch) | |
tree | 00ea3941543aad06172f5f16c78cfed2f4afb2e3 /drivers/scsi/ide-scsi.c | |
parent | 8ed965d612d9e9bc08805c75123f063cf6966311 (diff) | |
download | kernel_samsung_espresso10-e723ccd805857a46d3b63fbd20edea8579c6c541.zip kernel_samsung_espresso10-e723ccd805857a46d3b63fbd20edea8579c6c541.tar.gz kernel_samsung_espresso10-e723ccd805857a46d3b63fbd20edea8579c6c541.tar.bz2 |
[PATCH] sem2mutex: drivers/scsi/ide-scsi.c
Semaphore to mutex conversion.
The conversion was generated via scripts, and the result was validated
automatically via a script as well.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Jens Axboe <axboe@suse.de>
Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/scsi/ide-scsi.c')
-rw-r--r-- | drivers/scsi/ide-scsi.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c index 0cf0e4c..39b760a 100644 --- a/drivers/scsi/ide-scsi.c +++ b/drivers/scsi/ide-scsi.c @@ -47,6 +47,7 @@ #include <linux/ide.h> #include <linux/scatterlist.h> #include <linux/delay.h> +#include <linux/mutex.h> #include <asm/io.h> #include <asm/bitops.h> @@ -109,7 +110,7 @@ typedef struct ide_scsi_obj { unsigned long log; /* log flags */ } idescsi_scsi_t; -static DECLARE_MUTEX(idescsi_ref_sem); +static DEFINE_MUTEX(idescsi_ref_mutex); #define ide_scsi_g(disk) \ container_of((disk)->private_data, struct ide_scsi_obj, driver) @@ -118,19 +119,19 @@ static struct ide_scsi_obj *ide_scsi_get(struct gendisk *disk) { struct ide_scsi_obj *scsi = NULL; - down(&idescsi_ref_sem); + mutex_lock(&idescsi_ref_mutex); scsi = ide_scsi_g(disk); if (scsi) scsi_host_get(scsi->host); - up(&idescsi_ref_sem); + mutex_unlock(&idescsi_ref_mutex); return scsi; } static void ide_scsi_put(struct ide_scsi_obj *scsi) { - down(&idescsi_ref_sem); + mutex_lock(&idescsi_ref_mutex); scsi_host_put(scsi->host); - up(&idescsi_ref_sem); + mutex_unlock(&idescsi_ref_mutex); } static inline idescsi_scsi_t *scsihost_to_idescsi(struct Scsi_Host *host) |