diff options
Diffstat (limited to 'drivers/ieee1394')
-rw-r--r-- | drivers/ieee1394/hosts.c | 4 | ||||
-rw-r--r-- | drivers/ieee1394/nodemgr.c | 14 |
2 files changed, 7 insertions, 11 deletions
diff --git a/drivers/ieee1394/hosts.c b/drivers/ieee1394/hosts.c index 8dd09d850419..237d0c9d69c6 100644 --- a/drivers/ieee1394/hosts.c +++ b/drivers/ieee1394/hosts.c | |||
@@ -155,11 +155,11 @@ struct hpsb_host *hpsb_alloc_host(struct hpsb_host_driver *drv, size_t extra, | |||
155 | memcpy(&h->device, &nodemgr_dev_template_host, sizeof(h->device)); | 155 | memcpy(&h->device, &nodemgr_dev_template_host, sizeof(h->device)); |
156 | h->device.parent = dev; | 156 | h->device.parent = dev; |
157 | set_dev_node(&h->device, dev_to_node(dev)); | 157 | set_dev_node(&h->device, dev_to_node(dev)); |
158 | snprintf(h->device.bus_id, BUS_ID_SIZE, "fw-host%d", h->id); | 158 | dev_set_name(&h->device, "fw-host%d", h->id); |
159 | 159 | ||
160 | h->host_dev.parent = &h->device; | 160 | h->host_dev.parent = &h->device; |
161 | h->host_dev.class = &hpsb_host_class; | 161 | h->host_dev.class = &hpsb_host_class; |
162 | snprintf(h->host_dev.bus_id, BUS_ID_SIZE, "fw-host%d", h->id); | 162 | dev_set_name(&h->host_dev, "fw-host%d", h->id); |
163 | 163 | ||
164 | if (device_register(&h->device)) | 164 | if (device_register(&h->device)) |
165 | goto fail; | 165 | goto fail; |
diff --git a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c index 2376b729e876..9e39f73282ee 100644 --- a/drivers/ieee1394/nodemgr.c +++ b/drivers/ieee1394/nodemgr.c | |||
@@ -826,13 +826,11 @@ static struct node_entry *nodemgr_create_node(octlet_t guid, | |||
826 | memcpy(&ne->device, &nodemgr_dev_template_ne, | 826 | memcpy(&ne->device, &nodemgr_dev_template_ne, |
827 | sizeof(ne->device)); | 827 | sizeof(ne->device)); |
828 | ne->device.parent = &host->device; | 828 | ne->device.parent = &host->device; |
829 | snprintf(ne->device.bus_id, BUS_ID_SIZE, "%016Lx", | 829 | dev_set_name(&ne->device, "%016Lx", (unsigned long long)(ne->guid)); |
830 | (unsigned long long)(ne->guid)); | ||
831 | 830 | ||
832 | ne->node_dev.parent = &ne->device; | 831 | ne->node_dev.parent = &ne->device; |
833 | ne->node_dev.class = &nodemgr_ne_class; | 832 | ne->node_dev.class = &nodemgr_ne_class; |
834 | snprintf(ne->node_dev.bus_id, BUS_ID_SIZE, "%016Lx", | 833 | dev_set_name(&ne->node_dev, "%016Lx", (unsigned long long)(ne->guid)); |
835 | (unsigned long long)(ne->guid)); | ||
836 | 834 | ||
837 | if (device_register(&ne->device)) | 835 | if (device_register(&ne->device)) |
838 | goto fail_devreg; | 836 | goto fail_devreg; |
@@ -932,13 +930,11 @@ static void nodemgr_register_device(struct node_entry *ne, | |||
932 | 930 | ||
933 | ud->device.parent = parent; | 931 | ud->device.parent = parent; |
934 | 932 | ||
935 | snprintf(ud->device.bus_id, BUS_ID_SIZE, "%s-%u", | 933 | dev_set_name(&ud->device, "%s-%u", dev_name(&ne->device), ud->id); |
936 | ne->device.bus_id, ud->id); | ||
937 | 934 | ||
938 | ud->unit_dev.parent = &ud->device; | 935 | ud->unit_dev.parent = &ud->device; |
939 | ud->unit_dev.class = &nodemgr_ud_class; | 936 | ud->unit_dev.class = &nodemgr_ud_class; |
940 | snprintf(ud->unit_dev.bus_id, BUS_ID_SIZE, "%s-%u", | 937 | dev_set_name(&ud->unit_dev, "%s-%u", dev_name(&ne->device), ud->id); |
941 | ne->device.bus_id, ud->id); | ||
942 | 938 | ||
943 | if (device_register(&ud->device)) | 939 | if (device_register(&ud->device)) |
944 | goto fail_devreg; | 940 | goto fail_devreg; |
@@ -953,7 +949,7 @@ static void nodemgr_register_device(struct node_entry *ne, | |||
953 | fail_classdevreg: | 949 | fail_classdevreg: |
954 | device_unregister(&ud->device); | 950 | device_unregister(&ud->device); |
955 | fail_devreg: | 951 | fail_devreg: |
956 | HPSB_ERR("Failed to create unit %s", ud->device.bus_id); | 952 | HPSB_ERR("Failed to create unit %s", dev_name(&ud->device)); |
957 | } | 953 | } |
958 | 954 | ||
959 | 955 | ||