Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 118512
b: refs/heads/master
c: 233976e
h: refs/heads/master
v: v3
  • Loading branch information
Kay Sievers authored and Stefan Richter committed Oct 31, 2008
1 parent ecbc8dc commit a222076
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a1f64819fe9f136c98d572794a35a7e377c951ef
refs/heads/master: 233976e539a93de1320fc7625b24076b1f9e2c9c
4 changes: 2 additions & 2 deletions trunk/drivers/ieee1394/hosts.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,11 @@ struct hpsb_host *hpsb_alloc_host(struct hpsb_host_driver *drv, size_t extra,
memcpy(&h->device, &nodemgr_dev_template_host, sizeof(h->device));
h->device.parent = dev;
set_dev_node(&h->device, dev_to_node(dev));
snprintf(h->device.bus_id, BUS_ID_SIZE, "fw-host%d", h->id);
dev_set_name(&h->device, "fw-host%d", h->id);

h->host_dev.parent = &h->device;
h->host_dev.class = &hpsb_host_class;
snprintf(h->host_dev.bus_id, BUS_ID_SIZE, "fw-host%d", h->id);
dev_set_name(&h->host_dev, "fw-host%d", h->id);

if (device_register(&h->device))
goto fail;
Expand Down
14 changes: 5 additions & 9 deletions trunk/drivers/ieee1394/nodemgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -826,13 +826,11 @@ static struct node_entry *nodemgr_create_node(octlet_t guid,
memcpy(&ne->device, &nodemgr_dev_template_ne,
sizeof(ne->device));
ne->device.parent = &host->device;
snprintf(ne->device.bus_id, BUS_ID_SIZE, "%016Lx",
(unsigned long long)(ne->guid));
dev_set_name(&ne->device, "%016Lx", (unsigned long long)(ne->guid));

ne->node_dev.parent = &ne->device;
ne->node_dev.class = &nodemgr_ne_class;
snprintf(ne->node_dev.bus_id, BUS_ID_SIZE, "%016Lx",
(unsigned long long)(ne->guid));
dev_set_name(&ne->node_dev, "%016Lx", (unsigned long long)(ne->guid));

if (device_register(&ne->device))
goto fail_devreg;
Expand Down Expand Up @@ -932,13 +930,11 @@ static void nodemgr_register_device(struct node_entry *ne,

ud->device.parent = parent;

snprintf(ud->device.bus_id, BUS_ID_SIZE, "%s-%u",
ne->device.bus_id, ud->id);
dev_set_name(&ud->device, "%s-%u", dev_name(&ne->device), ud->id);

ud->unit_dev.parent = &ud->device;
ud->unit_dev.class = &nodemgr_ud_class;
snprintf(ud->unit_dev.bus_id, BUS_ID_SIZE, "%s-%u",
ne->device.bus_id, ud->id);
dev_set_name(&ud->unit_dev, "%s-%u", dev_name(&ne->device), ud->id);

if (device_register(&ud->device))
goto fail_devreg;
Expand All @@ -953,7 +949,7 @@ static void nodemgr_register_device(struct node_entry *ne,
fail_classdevreg:
device_unregister(&ud->device);
fail_devreg:
HPSB_ERR("Failed to create unit %s", ud->device.bus_id);
HPSB_ERR("Failed to create unit %s", dev_name(&ud->device));
}


Expand Down

0 comments on commit a222076

Please sign in to comment.