aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/hosts.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/hosts.c')
-rw-r--r--drivers/scsi/hosts.c8
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);
156void scsi_remove_host(struct Scsi_Host *shost) 156void 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;