aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_transport_iscsi.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_iscsi.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_iscsi.c')
-rw-r--r--drivers/scsi/scsi_transport_iscsi.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c
index 4a803ebaf508..75c9297694cb 100644
--- a/drivers/scsi/scsi_transport_iscsi.c
+++ b/drivers/scsi/scsi_transport_iscsi.c
@@ -187,8 +187,7 @@ iscsi_create_endpoint(int dd_size)
187 187
188 ep->id = id; 188 ep->id = id;
189 ep->dev.class = &iscsi_endpoint_class; 189 ep->dev.class = &iscsi_endpoint_class;
190 snprintf(ep->dev.bus_id, BUS_ID_SIZE, "ep-%llu", 190 dev_set_name(&ep->dev, "ep-%llu", (unsigned long long) id);
191 (unsigned long long) id);
192 err = device_register(&ep->dev); 191 err = device_register(&ep->dev);
193 if (err) 192 if (err)
194 goto free_ep; 193 goto free_ep;
@@ -724,8 +723,7 @@ int iscsi_add_session(struct iscsi_cls_session *session, unsigned int target_id)
724 } 723 }
725 session->target_id = id; 724 session->target_id = id;
726 725
727 snprintf(session->dev.bus_id, BUS_ID_SIZE, "session%u", 726 dev_set_name(&session->dev, "session%u", session->sid);
728 session->sid);
729 err = device_add(&session->dev); 727 err = device_add(&session->dev);
730 if (err) { 728 if (err) {
731 iscsi_cls_session_printk(KERN_ERR, session, 729 iscsi_cls_session_printk(KERN_ERR, session,
@@ -898,8 +896,7 @@ iscsi_create_conn(struct iscsi_cls_session *session, int dd_size, uint32_t cid)
898 if (!get_device(&session->dev)) 896 if (!get_device(&session->dev))
899 goto free_conn; 897 goto free_conn;
900 898
901 snprintf(conn->dev.bus_id, BUS_ID_SIZE, "connection%d:%u", 899 dev_set_name(&conn->dev, "connection%d:%u", session->sid, cid);
902 session->sid, cid);
903 conn->dev.parent = &session->dev; 900 conn->dev.parent = &session->dev;
904 conn->dev.release = iscsi_conn_release; 901 conn->dev.release = iscsi_conn_release;
905 err = device_register(&conn->dev); 902 err = device_register(&conn->dev);
@@ -1816,7 +1813,7 @@ iscsi_register_transport(struct iscsi_transport *tt)
1816 priv->t.create_work_queue = 1; 1813 priv->t.create_work_queue = 1;
1817 1814
1818 priv->dev.class = &iscsi_transport_class; 1815 priv->dev.class = &iscsi_transport_class;
1819 snprintf(priv->dev.bus_id, BUS_ID_SIZE, "%s", tt->name); 1816 dev_set_name(&priv->dev, "%s", tt->name);
1820 err = device_register(&priv->dev); 1817 err = device_register(&priv->dev);
1821 if (err) 1818 if (err)
1822 goto free_priv; 1819 goto free_priv;