diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-03-23 23:44:19 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-03-23 23:44:19 -0500 |
commit | 1ebbe2b20091d306453a5cf480a87e6cd28ae76f (patch) | |
tree | f5cd7a0fa69b8b1938cb5a0faed2e7b0628072a5 /drivers/scsi/ide-scsi.c | |
parent | ac58c9059da8886b5e8cde012a80266b18ca146e (diff) | |
parent | 674a396c6d2ba0341ebdd7c1c9950f32f018e2dd (diff) | |
download | linux-1ebbe2b20091d306453a5cf480a87e6cd28ae76f.tar.gz linux-1ebbe2b20091d306453a5cf480a87e6cd28ae76f.tar.bz2 linux-1ebbe2b20091d306453a5cf480a87e6cd28ae76f.zip |
Merge branch 'linus'
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 0cf0e4c7ac0c..39b760a24241 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) |