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, 6 insertions, 2 deletions
diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c
index 68ef1636678d..38c3a291efac 100644
--- a/drivers/scsi/hosts.c
+++ b/drivers/scsi/hosts.c
@@ -263,6 +263,10 @@ static void scsi_host_dev_release(struct device *dev)
263 kthread_stop(shost->ehandler); 263 kthread_stop(shost->ehandler);
264 if (shost->work_q) 264 if (shost->work_q)
265 destroy_workqueue(shost->work_q); 265 destroy_workqueue(shost->work_q);
266 if (shost->uspace_req_q) {
267 kfree(shost->uspace_req_q->queuedata);
268 scsi_free_queue(shost->uspace_req_q);
269 }
266 270
267 scsi_destroy_command_freelist(shost); 271 scsi_destroy_command_freelist(shost);
268 if (shost->bqt) 272 if (shost->bqt)
@@ -301,8 +305,8 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize)
301 if (!shost) 305 if (!shost)
302 return NULL; 306 return NULL;
303 307
304 spin_lock_init(&shost->default_lock); 308 shost->host_lock = &shost->default_lock;
305 scsi_assign_lock(shost, &shost->default_lock); 309 spin_lock_init(shost->host_lock);
306 shost->shost_state = SHOST_CREATED; 310 shost->shost_state = SHOST_CREATED;
307 INIT_LIST_HEAD(&shost->__devices); 311 INIT_LIST_HEAD(&shost->__devices);
308 INIT_LIST_HEAD(&shost->__targets); 312 INIT_LIST_HEAD(&shost->__targets);