diff options
-rw-r--r-- | arch/sparc64/kernel/ebus.c | 4 | ||||
-rw-r--r-- | arch/sparc64/kernel/of_device.c | 4 | ||||
-rw-r--r-- | arch/sparc64/kernel/pci.c | 2 | ||||
-rw-r--r-- | arch/sparc64/kernel/vio.c | 16 | ||||
-rw-r--r-- | drivers/sbus/sbus.c | 6 |
5 files changed, 15 insertions, 17 deletions
diff --git a/arch/sparc64/kernel/ebus.c b/arch/sparc64/kernel/ebus.c index c49d0388b793..4d58d7ce708d 100644 --- a/arch/sparc64/kernel/ebus.c +++ b/arch/sparc64/kernel/ebus.c | |||
@@ -401,7 +401,7 @@ static void __init fill_ebus_device(struct device_node *dp, struct linux_ebus_de | |||
401 | dev->ofdev.node = dp; | 401 | dev->ofdev.node = dp; |
402 | dev->ofdev.dev.parent = &dev->bus->ofdev.dev; | 402 | dev->ofdev.dev.parent = &dev->bus->ofdev.dev; |
403 | dev->ofdev.dev.bus = &ebus_bus_type; | 403 | dev->ofdev.dev.bus = &ebus_bus_type; |
404 | sprintf(dev->ofdev.dev.bus_id, "ebus[%08x]", dp->node); | 404 | dev_set_name(&dev->ofdev.dev, "ebus[%08x]", dp->node); |
405 | 405 | ||
406 | /* Register with core */ | 406 | /* Register with core */ |
407 | if (of_device_register(&dev->ofdev) != 0) | 407 | if (of_device_register(&dev->ofdev) != 0) |
@@ -501,7 +501,7 @@ void __init ebus_init(void) | |||
501 | ebus->ofdev.node = dp; | 501 | ebus->ofdev.node = dp; |
502 | ebus->ofdev.dev.parent = &pdev->dev; | 502 | ebus->ofdev.dev.parent = &pdev->dev; |
503 | ebus->ofdev.dev.bus = &ebus_bus_type; | 503 | ebus->ofdev.dev.bus = &ebus_bus_type; |
504 | sprintf(ebus->ofdev.dev.bus_id, "ebus%d", num_ebus); | 504 | dev_set_name(&ebus->ofdev.dev, "ebus%d", num_ebus); |
505 | 505 | ||
506 | /* Register with core */ | 506 | /* Register with core */ |
507 | if (of_device_register(&ebus->ofdev) != 0) | 507 | if (of_device_register(&ebus->ofdev) != 0) |
diff --git a/arch/sparc64/kernel/of_device.c b/arch/sparc64/kernel/of_device.c index d569f60c24b8..4fd48ab7dda4 100644 --- a/arch/sparc64/kernel/of_device.c +++ b/arch/sparc64/kernel/of_device.c | |||
@@ -797,9 +797,9 @@ static struct of_device * __init scan_one_device(struct device_node *dp, | |||
797 | op->dev.parent = parent; | 797 | op->dev.parent = parent; |
798 | op->dev.bus = &of_platform_bus_type; | 798 | op->dev.bus = &of_platform_bus_type; |
799 | if (!parent) | 799 | if (!parent) |
800 | strcpy(op->dev.bus_id, "root"); | 800 | dev_set_name(&op->dev, "root"); |
801 | else | 801 | else |
802 | sprintf(op->dev.bus_id, "%08x", dp->node); | 802 | dev_set_name(&op->dev, "%08x", dp->node); |
803 | 803 | ||
804 | if (of_device_register(op)) { | 804 | if (of_device_register(op)) { |
805 | printk("%s: Could not register of device.\n", | 805 | printk("%s: Could not register of device.\n", |
diff --git a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c index d00a3656c287..55096195458f 100644 --- a/arch/sparc64/kernel/pci.c +++ b/arch/sparc64/kernel/pci.c | |||
@@ -408,7 +408,7 @@ struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm, | |||
408 | dev->class = class >> 8; | 408 | dev->class = class >> 8; |
409 | dev->revision = class & 0xff; | 409 | dev->revision = class & 0xff; |
410 | 410 | ||
411 | sprintf(dev->dev.bus_id, "%04x:%02x:%02x.%d", pci_domain_nr(bus), | 411 | dev_set_name(&dev->dev, "%04x:%02x:%02x.%d", pci_domain_nr(bus), |
412 | dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn)); | 412 | dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn)); |
413 | 413 | ||
414 | if (ofpci_verbose) | 414 | if (ofpci_verbose) |
diff --git a/arch/sparc64/kernel/vio.c b/arch/sparc64/kernel/vio.c index ecbb8b618b8c..a490077891a4 100644 --- a/arch/sparc64/kernel/vio.c +++ b/arch/sparc64/kernel/vio.c | |||
@@ -260,16 +260,14 @@ static struct vio_dev *vio_create_one(struct mdesc_handle *hp, u64 mp, | |||
260 | vio_fill_channel_info(hp, mp, vdev); | 260 | vio_fill_channel_info(hp, mp, vdev); |
261 | 261 | ||
262 | if (!id) { | 262 | if (!id) { |
263 | snprintf(vdev->dev.bus_id, BUS_ID_SIZE, "%s", | 263 | dev_set_name(&vdev->dev, "%s", bus_id_name); |
264 | bus_id_name); | ||
265 | vdev->dev_no = ~(u64)0; | 264 | vdev->dev_no = ~(u64)0; |
266 | } else if (!cfg_handle) { | 265 | } else if (!cfg_handle) { |
267 | snprintf(vdev->dev.bus_id, BUS_ID_SIZE, "%s-%lu", | 266 | dev_set_name(&vdev->dev, "%s-%lu", bus_id_name, *id); |
268 | bus_id_name, *id); | ||
269 | vdev->dev_no = *id; | 267 | vdev->dev_no = *id; |
270 | } else { | 268 | } else { |
271 | snprintf(vdev->dev.bus_id, BUS_ID_SIZE, "%s-%lu-%lu", | 269 | dev_set_name(&vdev->dev, "%s-%lu-%lu", bus_id_name, |
272 | bus_id_name, *cfg_handle, *id); | 270 | *cfg_handle, *id); |
273 | vdev->dev_no = *cfg_handle; | 271 | vdev->dev_no = *cfg_handle; |
274 | } | 272 | } |
275 | 273 | ||
@@ -292,12 +290,12 @@ static struct vio_dev *vio_create_one(struct mdesc_handle *hp, u64 mp, | |||
292 | } | 290 | } |
293 | vdev->dp = dp; | 291 | vdev->dp = dp; |
294 | 292 | ||
295 | printk(KERN_INFO "VIO: Adding device %s\n", vdev->dev.bus_id); | 293 | printk(KERN_INFO "VIO: Adding device %s\n", dev_name(&vdev->dev)); |
296 | 294 | ||
297 | err = device_register(&vdev->dev); | 295 | err = device_register(&vdev->dev); |
298 | if (err) { | 296 | if (err) { |
299 | printk(KERN_ERR "VIO: Could not register device %s, err=%d\n", | 297 | printk(KERN_ERR "VIO: Could not register device %s, err=%d\n", |
300 | vdev->dev.bus_id, err); | 298 | dev_name(&vdev->dev), err); |
301 | kfree(vdev); | 299 | kfree(vdev); |
302 | return NULL; | 300 | return NULL; |
303 | } | 301 | } |
@@ -330,7 +328,7 @@ static void vio_remove(struct mdesc_handle *hp, u64 node) | |||
330 | dev = device_find_child(&root_vdev->dev, (void *) node, | 328 | dev = device_find_child(&root_vdev->dev, (void *) node, |
331 | vio_md_node_match); | 329 | vio_md_node_match); |
332 | if (dev) { | 330 | if (dev) { |
333 | printk(KERN_INFO "VIO: Removing device %s\n", dev->bus_id); | 331 | printk(KERN_INFO "VIO: Removing device %s\n", dev_name(dev)); |
334 | 332 | ||
335 | device_unregister(dev); | 333 | device_unregister(dev); |
336 | } | 334 | } |
diff --git a/drivers/sbus/sbus.c b/drivers/sbus/sbus.c index c37d7c2587ff..73a86d09bba8 100644 --- a/drivers/sbus/sbus.c +++ b/drivers/sbus/sbus.c | |||
@@ -78,7 +78,7 @@ static void __init fill_sbus_device(struct device_node *dp, struct sbus_dev *sde | |||
78 | else | 78 | else |
79 | sdev->ofdev.dev.parent = &sdev->bus->ofdev.dev; | 79 | sdev->ofdev.dev.parent = &sdev->bus->ofdev.dev; |
80 | sdev->ofdev.dev.bus = &sbus_bus_type; | 80 | sdev->ofdev.dev.bus = &sbus_bus_type; |
81 | sprintf(sdev->ofdev.dev.bus_id, "sbus[%08x]", dp->node); | 81 | dev_set_name(&sdev->ofdev.dev, "sbus[%08x]", dp->node); |
82 | 82 | ||
83 | if (of_device_register(&sdev->ofdev) != 0) | 83 | if (of_device_register(&sdev->ofdev) != 0) |
84 | printk(KERN_DEBUG "sbus: device registration error for %s!\n", | 84 | printk(KERN_DEBUG "sbus: device registration error for %s!\n", |
@@ -257,11 +257,11 @@ static void __init build_one_sbus(struct device_node *dp, int num_sbus) | |||
257 | sbus->ofdev.node = dp; | 257 | sbus->ofdev.node = dp; |
258 | sbus->ofdev.dev.parent = NULL; | 258 | sbus->ofdev.dev.parent = NULL; |
259 | sbus->ofdev.dev.bus = &sbus_bus_type; | 259 | sbus->ofdev.dev.bus = &sbus_bus_type; |
260 | sprintf(sbus->ofdev.dev.bus_id, "sbus%d", num_sbus); | 260 | dev_set_name(&sbus->ofdev.dev, "sbus%d", num_sbus); |
261 | 261 | ||
262 | if (of_device_register(&sbus->ofdev) != 0) | 262 | if (of_device_register(&sbus->ofdev) != 0) |
263 | printk(KERN_DEBUG "sbus: device registration error for %s!\n", | 263 | printk(KERN_DEBUG "sbus: device registration error for %s!\n", |
264 | sbus->ofdev.dev.bus_id); | 264 | dev_name(&sbus->ofdev.dev)); |
265 | 265 | ||
266 | dev_dp = dp->child; | 266 | dev_dp = dp->child; |
267 | while (dev_dp) { | 267 | while (dev_dp) { |