aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_scan.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/scsi_scan.c')
-rw-r--r--drivers/scsi/scsi_scan.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index b53c5f67e372..40ea71cd2ca6 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -236,6 +236,7 @@ static struct scsi_device *scsi_alloc_sdev(struct scsi_target *starget,
236 struct scsi_device *sdev; 236 struct scsi_device *sdev;
237 int display_failure_msg = 1, ret; 237 int display_failure_msg = 1, ret;
238 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); 238 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
239 extern void scsi_evt_thread(struct work_struct *work);
239 240
240 sdev = kzalloc(sizeof(*sdev) + shost->transportt->device_size, 241 sdev = kzalloc(sizeof(*sdev) + shost->transportt->device_size,
241 GFP_ATOMIC); 242 GFP_ATOMIC);
@@ -254,7 +255,9 @@ static struct scsi_device *scsi_alloc_sdev(struct scsi_target *starget,
254 INIT_LIST_HEAD(&sdev->same_target_siblings); 255 INIT_LIST_HEAD(&sdev->same_target_siblings);
255 INIT_LIST_HEAD(&sdev->cmd_list); 256 INIT_LIST_HEAD(&sdev->cmd_list);
256 INIT_LIST_HEAD(&sdev->starved_entry); 257 INIT_LIST_HEAD(&sdev->starved_entry);
258 INIT_LIST_HEAD(&sdev->event_list);
257 spin_lock_init(&sdev->list_lock); 259 spin_lock_init(&sdev->list_lock);
260 INIT_WORK(&sdev->event_work, scsi_evt_thread);
258 261
259 sdev->sdev_gendev.parent = get_device(&starget->dev); 262 sdev->sdev_gendev.parent = get_device(&starget->dev);
260 sdev->sdev_target = starget; 263 sdev->sdev_target = starget;