diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2008-12-03 16:41:36 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-01-02 11:22:16 -0500 |
commit | 71610f55fa4db63dbf5385929a47c9fb2451f332 (patch) | |
tree | b816672eef25e1436111e6c78053612bd22fb016 /drivers/scsi/hosts.c | |
parent | b58602a4bac012b5f4fc12fe6b46ab237b610d5d (diff) |
[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>
Diffstat (limited to 'drivers/scsi/hosts.c')
-rw-r--r-- | drivers/scsi/hosts.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c index 3fdbb13e80a8..aa670a1d1513 100644 --- a/drivers/scsi/hosts.c +++ b/drivers/scsi/hosts.c | |||
@@ -388,8 +388,7 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize) | |||
388 | shost->dma_boundary = 0xffffffff; | 388 | shost->dma_boundary = 0xffffffff; |
389 | 389 | ||
390 | device_initialize(&shost->shost_gendev); | 390 | device_initialize(&shost->shost_gendev); |
391 | snprintf(shost->shost_gendev.bus_id, BUS_ID_SIZE, "host%d", | 391 | dev_set_name(&shost->shost_gendev, "host%d", shost->host_no); |
392 | shost->host_no); | ||
393 | #ifndef CONFIG_SYSFS_DEPRECATED | 392 | #ifndef CONFIG_SYSFS_DEPRECATED |
394 | shost->shost_gendev.bus = &scsi_bus_type; | 393 | shost->shost_gendev.bus = &scsi_bus_type; |
395 | #endif | 394 | #endif |
@@ -398,8 +397,7 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize) | |||
398 | device_initialize(&shost->shost_dev); | 397 | device_initialize(&shost->shost_dev); |
399 | shost->shost_dev.parent = &shost->shost_gendev; | 398 | shost->shost_dev.parent = &shost->shost_gendev; |
400 | shost->shost_dev.class = &shost_class; | 399 | shost->shost_dev.class = &shost_class; |
401 | snprintf(shost->shost_dev.bus_id, BUS_ID_SIZE, "host%d", | 400 | dev_set_name(&shost->shost_dev, "host%d", shost->host_no); |
402 | shost->host_no); | ||
403 | shost->shost_dev.groups = scsi_sysfs_shost_attr_groups; | 401 | shost->shost_dev.groups = scsi_sysfs_shost_attr_groups; |
404 | 402 | ||
405 | shost->ehandler = kthread_run(scsi_error_handler, shost, | 403 | shost->ehandler = kthread_run(scsi_error_handler, shost, |