aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_transport_fc.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2008-12-03 16:41:36 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-01-02 11:22:16 -0500
commit71610f55fa4db63dbf5385929a47c9fb2451f332 (patch)
treeb816672eef25e1436111e6c78053612bd22fb016 /drivers/scsi/scsi_transport_fc.c
parentb58602a4bac012b5f4fc12fe6b46ab237b610d5d (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/scsi_transport_fc.c')
-rw-r--r--drivers/scsi/scsi_transport_fc.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c
index 062304de4854..dcef78776503 100644
--- a/drivers/scsi/scsi_transport_fc.c
+++ b/drivers/scsi/scsi_transport_fc.c
@@ -2486,8 +2486,8 @@ fc_rport_create(struct Scsi_Host *shost, int channel,
2486 device_initialize(dev); /* takes self reference */ 2486 device_initialize(dev); /* takes self reference */
2487 dev->parent = get_device(&shost->shost_gendev); /* parent reference */ 2487 dev->parent = get_device(&shost->shost_gendev); /* parent reference */
2488 dev->release = fc_rport_dev_release; 2488 dev->release = fc_rport_dev_release;
2489 sprintf(dev->bus_id, "rport-%d:%d-%d", 2489 dev_set_name(dev, "rport-%d:%d-%d",
2490 shost->host_no, channel, rport->number); 2490 shost->host_no, channel, rport->number);
2491 transport_setup_device(dev); 2491 transport_setup_device(dev);
2492 2492
2493 error = device_add(dev); 2493 error = device_add(dev);
@@ -3164,8 +3164,8 @@ fc_vport_setup(struct Scsi_Host *shost, int channel, struct device *pdev,
3164 device_initialize(dev); /* takes self reference */ 3164 device_initialize(dev); /* takes self reference */
3165 dev->parent = get_device(pdev); /* takes parent reference */ 3165 dev->parent = get_device(pdev); /* takes parent reference */
3166 dev->release = fc_vport_dev_release; 3166 dev->release = fc_vport_dev_release;
3167 sprintf(dev->bus_id, "vport-%d:%d-%d", 3167 dev_set_name(dev, "vport-%d:%d-%d",
3168 shost->host_no, channel, vport->number); 3168 shost->host_no, channel, vport->number);
3169 transport_setup_device(dev); 3169 transport_setup_device(dev);
3170 3170
3171 error = device_add(dev); 3171 error = device_add(dev);
@@ -3188,19 +3188,19 @@ fc_vport_setup(struct Scsi_Host *shost, int channel, struct device *pdev,
3188 */ 3188 */
3189 if (pdev != &shost->shost_gendev) { 3189 if (pdev != &shost->shost_gendev) {
3190 error = sysfs_create_link(&shost->shost_gendev.kobj, 3190 error = sysfs_create_link(&shost->shost_gendev.kobj,
3191 &dev->kobj, dev->bus_id); 3191 &dev->kobj, dev_name(dev));
3192 if (error) 3192 if (error)
3193 printk(KERN_ERR 3193 printk(KERN_ERR
3194 "%s: Cannot create vport symlinks for " 3194 "%s: Cannot create vport symlinks for "
3195 "%s, err=%d\n", 3195 "%s, err=%d\n",
3196 __func__, dev->bus_id, error); 3196 __func__, dev_name(dev), error);
3197 } 3197 }
3198 spin_lock_irqsave(shost->host_lock, flags); 3198 spin_lock_irqsave(shost->host_lock, flags);
3199 vport->flags &= ~FC_VPORT_CREATING; 3199 vport->flags &= ~FC_VPORT_CREATING;
3200 spin_unlock_irqrestore(shost->host_lock, flags); 3200 spin_unlock_irqrestore(shost->host_lock, flags);
3201 3201
3202 dev_printk(KERN_NOTICE, pdev, 3202 dev_printk(KERN_NOTICE, pdev,
3203 "%s created via shost%d channel %d\n", dev->bus_id, 3203 "%s created via shost%d channel %d\n", dev_name(dev),
3204 shost->host_no, channel); 3204 shost->host_no, channel);
3205 3205
3206 *ret_vport = vport; 3206 *ret_vport = vport;
@@ -3297,7 +3297,7 @@ fc_vport_terminate(struct fc_vport *vport)
3297 return stat; 3297 return stat;
3298 3298
3299 if (dev->parent != &shost->shost_gendev) 3299 if (dev->parent != &shost->shost_gendev)
3300 sysfs_remove_link(&shost->shost_gendev.kobj, dev->bus_id); 3300 sysfs_remove_link(&shost->shost_gendev.kobj, dev_name(dev));
3301 transport_remove_device(dev); 3301 transport_remove_device(dev);
3302 device_del(dev); 3302 device_del(dev);
3303 transport_destroy_device(dev); 3303 transport_destroy_device(dev);
@@ -3329,7 +3329,7 @@ fc_vport_sched_delete(struct work_struct *work)
3329 dev_printk(KERN_ERR, vport->dev.parent, 3329 dev_printk(KERN_ERR, vport->dev.parent,
3330 "%s: %s could not be deleted created via " 3330 "%s: %s could not be deleted created via "
3331 "shost%d channel %d - error %d\n", __func__, 3331 "shost%d channel %d - error %d\n", __func__,
3332 vport->dev.bus_id, vport->shost->host_no, 3332 dev_name(&vport->dev), vport->shost->host_no,
3333 vport->channel, stat); 3333 vport->channel, stat);
3334} 3334}
3335 3335