diff options
Diffstat (limited to 'drivers/ieee1394/hosts.c')
-rw-r--r-- | drivers/ieee1394/hosts.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/ieee1394/hosts.c b/drivers/ieee1394/hosts.c index bd0755c789c5..8dd09d850419 100644 --- a/drivers/ieee1394/hosts.c +++ b/drivers/ieee1394/hosts.c | |||
@@ -154,15 +154,16 @@ struct hpsb_host *hpsb_alloc_host(struct hpsb_host_driver *drv, size_t extra, | |||
154 | 154 | ||
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 | snprintf(h->device.bus_id, BUS_ID_SIZE, "fw-host%d", h->id); | 158 | snprintf(h->device.bus_id, BUS_ID_SIZE, "fw-host%d", h->id); |
158 | 159 | ||
159 | h->class_dev.dev = &h->device; | 160 | h->host_dev.parent = &h->device; |
160 | h->class_dev.class = &hpsb_host_class; | 161 | h->host_dev.class = &hpsb_host_class; |
161 | snprintf(h->class_dev.class_id, BUS_ID_SIZE, "fw-host%d", h->id); | 162 | snprintf(h->host_dev.bus_id, BUS_ID_SIZE, "fw-host%d", h->id); |
162 | 163 | ||
163 | if (device_register(&h->device)) | 164 | if (device_register(&h->device)) |
164 | goto fail; | 165 | goto fail; |
165 | if (class_device_register(&h->class_dev)) { | 166 | if (device_register(&h->host_dev)) { |
166 | device_unregister(&h->device); | 167 | device_unregister(&h->device); |
167 | goto fail; | 168 | goto fail; |
168 | } | 169 | } |
@@ -202,7 +203,7 @@ void hpsb_remove_host(struct hpsb_host *host) | |||
202 | host->driver = &dummy_driver; | 203 | host->driver = &dummy_driver; |
203 | highlevel_remove_host(host); | 204 | highlevel_remove_host(host); |
204 | 205 | ||
205 | class_device_unregister(&host->class_dev); | 206 | device_unregister(&host->host_dev); |
206 | device_unregister(&host->device); | 207 | device_unregister(&host->device); |
207 | } | 208 | } |
208 | 209 | ||