diff options
Diffstat (limited to 'drivers/scsi/scsi_sysfs.c')
-rw-r--r-- | drivers/scsi/scsi_sysfs.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c index 93c28f30bbd7..da63802cbf9d 100644 --- a/drivers/scsi/scsi_sysfs.c +++ b/drivers/scsi/scsi_sysfs.c | |||
@@ -1079,16 +1079,14 @@ void scsi_sysfs_device_initialize(struct scsi_device *sdev) | |||
1079 | device_initialize(&sdev->sdev_gendev); | 1079 | device_initialize(&sdev->sdev_gendev); |
1080 | sdev->sdev_gendev.bus = &scsi_bus_type; | 1080 | sdev->sdev_gendev.bus = &scsi_bus_type; |
1081 | sdev->sdev_gendev.type = &scsi_dev_type; | 1081 | sdev->sdev_gendev.type = &scsi_dev_type; |
1082 | sprintf(sdev->sdev_gendev.bus_id,"%d:%d:%d:%d", | 1082 | dev_set_name(&sdev->sdev_gendev, "%d:%d:%d:%d", |
1083 | sdev->host->host_no, sdev->channel, sdev->id, | 1083 | sdev->host->host_no, sdev->channel, sdev->id, sdev->lun); |
1084 | sdev->lun); | 1084 | |
1085 | |||
1086 | device_initialize(&sdev->sdev_dev); | 1085 | device_initialize(&sdev->sdev_dev); |
1087 | sdev->sdev_dev.parent = &sdev->sdev_gendev; | 1086 | sdev->sdev_dev.parent = &sdev->sdev_gendev; |
1088 | sdev->sdev_dev.class = &sdev_class; | 1087 | sdev->sdev_dev.class = &sdev_class; |
1089 | snprintf(sdev->sdev_dev.bus_id, BUS_ID_SIZE, | 1088 | dev_set_name(&sdev->sdev_dev, "%d:%d:%d:%d", |
1090 | "%d:%d:%d:%d", sdev->host->host_no, | 1089 | sdev->host->host_no, sdev->channel, sdev->id, sdev->lun); |
1091 | sdev->channel, sdev->id, sdev->lun); | ||
1092 | sdev->scsi_level = starget->scsi_level; | 1090 | sdev->scsi_level = starget->scsi_level; |
1093 | transport_setup_device(&sdev->sdev_gendev); | 1091 | transport_setup_device(&sdev->sdev_gendev); |
1094 | spin_lock_irqsave(shost->host_lock, flags); | 1092 | spin_lock_irqsave(shost->host_lock, flags); |