[SCSI] struct device - replace bus_id with dev_name(), dev_set_name()
[jejb: limit ioctl to returning 20 characters to avoid overrun on long device names and add a few more conversions] Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
This commit is contained in:
committed by
James Bottomley
parent
b58602a4ba
commit
71610f55fa
@@ -388,8 +388,7 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize)
|
||||
shost->dma_boundary = 0xffffffff;
|
||||
|
||||
device_initialize(&shost->shost_gendev);
|
||||
snprintf(shost->shost_gendev.bus_id, BUS_ID_SIZE, "host%d",
|
||||
shost->host_no);
|
||||
dev_set_name(&shost->shost_gendev, "host%d", shost->host_no);
|
||||
#ifndef CONFIG_SYSFS_DEPRECATED
|
||||
shost->shost_gendev.bus = &scsi_bus_type;
|
||||
#endif
|
||||
@@ -398,8 +397,7 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize)
|
||||
device_initialize(&shost->shost_dev);
|
||||
shost->shost_dev.parent = &shost->shost_gendev;
|
||||
shost->shost_dev.class = &shost_class;
|
||||
snprintf(shost->shost_dev.bus_id, BUS_ID_SIZE, "host%d",
|
||||
shost->host_no);
|
||||
dev_set_name(&shost->shost_dev, "host%d", shost->host_no);
|
||||
shost->shost_dev.groups = scsi_sysfs_shost_attr_groups;
|
||||
|
||||
shost->ehandler = kthread_run(scsi_error_handler, shost,
|
||||
|
Reference in New Issue
Block a user