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.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c
index 35cd892dce04..fed0b02ebc1d 100644
--- a/drivers/scsi/hosts.c
+++ b/drivers/scsi/hosts.c
@@ -232,8 +232,8 @@ int scsi_add_host(struct Scsi_Host *shost, struct device *dev)
232 } 232 }
233 233
234 if (shost->transportt->create_work_queue) { 234 if (shost->transportt->create_work_queue) {
235 snprintf(shost->work_q_name, KOBJ_NAME_LEN, "scsi_wq_%d", 235 snprintf(shost->work_q_name, sizeof(shost->work_q_name),
236 shost->host_no); 236 "scsi_wq_%d", shost->host_no);
237 shost->work_q = create_singlethread_workqueue( 237 shost->work_q = create_singlethread_workqueue(
238 shost->work_q_name); 238 shost->work_q_name);
239 if (!shost->work_q) { 239 if (!shost->work_q) {
@@ -466,7 +466,8 @@ struct Scsi_Host *scsi_host_lookup(unsigned short hostnum)
466 struct device *cdev; 466 struct device *cdev;
467 struct Scsi_Host *shost = ERR_PTR(-ENXIO); 467 struct Scsi_Host *shost = ERR_PTR(-ENXIO);
468 468
469 cdev = class_find_device(&shost_class, &hostnum, __scsi_host_match); 469 cdev = class_find_device(&shost_class, NULL, &hostnum,
470 __scsi_host_match);
470 if (cdev) { 471 if (cdev) {
471 shost = scsi_host_get(class_to_shost(cdev)); 472 shost = scsi_host_get(class_to_shost(cdev));
472 put_device(cdev); 473 put_device(cdev);