diff options
author | Arjan van de Ven <arjan@infradead.org> | 2006-01-11 07:16:10 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2006-01-12 12:53:11 -0500 |
commit | 0b9506723826c68b50fa33e345700ddcac1bed36 (patch) | |
tree | da3e432ef4517c47ebdc088c6322d0ac51193127 /drivers/scsi/hosts.c | |
parent | dacee84b070c4e705a5b6446f1f0a6a6e2f8d7a4 (diff) |
[SCSI] turn most scsi semaphores into mutexes
the scsi layer is using semaphores in a mutex way, this patch converts
these into using mutexes instead
Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/hosts.c')
-rw-r--r-- | drivers/scsi/hosts.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c index 66783c860a19..588107923499 100644 --- a/drivers/scsi/hosts.c +++ b/drivers/scsi/hosts.c | |||
@@ -156,16 +156,16 @@ EXPORT_SYMBOL(scsi_host_set_state); | |||
156 | void scsi_remove_host(struct Scsi_Host *shost) | 156 | void scsi_remove_host(struct Scsi_Host *shost) |
157 | { | 157 | { |
158 | unsigned long flags; | 158 | unsigned long flags; |
159 | down(&shost->scan_mutex); | 159 | mutex_lock(&shost->scan_mutex); |
160 | spin_lock_irqsave(shost->host_lock, flags); | 160 | spin_lock_irqsave(shost->host_lock, flags); |
161 | if (scsi_host_set_state(shost, SHOST_CANCEL)) | 161 | if (scsi_host_set_state(shost, SHOST_CANCEL)) |
162 | if (scsi_host_set_state(shost, SHOST_CANCEL_RECOVERY)) { | 162 | if (scsi_host_set_state(shost, SHOST_CANCEL_RECOVERY)) { |
163 | spin_unlock_irqrestore(shost->host_lock, flags); | 163 | spin_unlock_irqrestore(shost->host_lock, flags); |
164 | up(&shost->scan_mutex); | 164 | mutex_unlock(&shost->scan_mutex); |
165 | return; | 165 | return; |
166 | } | 166 | } |
167 | spin_unlock_irqrestore(shost->host_lock, flags); | 167 | spin_unlock_irqrestore(shost->host_lock, flags); |
168 | up(&shost->scan_mutex); | 168 | mutex_unlock(&shost->scan_mutex); |
169 | scsi_forget_host(shost); | 169 | scsi_forget_host(shost); |
170 | scsi_proc_host_rm(shost); | 170 | scsi_proc_host_rm(shost); |
171 | 171 | ||
@@ -320,7 +320,7 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize) | |||
320 | INIT_LIST_HEAD(&shost->starved_list); | 320 | INIT_LIST_HEAD(&shost->starved_list); |
321 | init_waitqueue_head(&shost->host_wait); | 321 | init_waitqueue_head(&shost->host_wait); |
322 | 322 | ||
323 | init_MUTEX(&shost->scan_mutex); | 323 | mutex_init(&shost->scan_mutex); |
324 | 324 | ||
325 | shost->host_no = scsi_host_next_hn++; /* XXX(hch): still racy */ | 325 | shost->host_no = scsi_host_next_hn++; /* XXX(hch): still racy */ |
326 | shost->dma_channel = 0xff; | 326 | shost->dma_channel = 0xff; |