diff options
Diffstat (limited to 'drivers/base/bus.c')
-rw-r--r-- | drivers/base/bus.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/base/bus.c b/drivers/base/bus.c index 5aee1c0169ea..83f32b891fa9 100644 --- a/drivers/base/bus.c +++ b/drivers/base/bus.c | |||
@@ -333,7 +333,7 @@ static int match_name(struct device *dev, void *data) | |||
333 | { | 333 | { |
334 | const char *name = data; | 334 | const char *name = data; |
335 | 335 | ||
336 | return sysfs_streq(name, dev->bus_id); | 336 | return sysfs_streq(name, dev_name(dev)); |
337 | } | 337 | } |
338 | 338 | ||
339 | /** | 339 | /** |
@@ -461,12 +461,12 @@ int bus_add_device(struct device *dev) | |||
461 | int error = 0; | 461 | int error = 0; |
462 | 462 | ||
463 | if (bus) { | 463 | if (bus) { |
464 | pr_debug("bus: '%s': add device %s\n", bus->name, dev->bus_id); | 464 | pr_debug("bus: '%s': add device %s\n", bus->name, dev_name(dev)); |
465 | error = device_add_attrs(bus, dev); | 465 | error = device_add_attrs(bus, dev); |
466 | if (error) | 466 | if (error) |
467 | goto out_put; | 467 | goto out_put; |
468 | error = sysfs_create_link(&bus->p->devices_kset->kobj, | 468 | error = sysfs_create_link(&bus->p->devices_kset->kobj, |
469 | &dev->kobj, dev->bus_id); | 469 | &dev->kobj, dev_name(dev)); |
470 | if (error) | 470 | if (error) |
471 | goto out_id; | 471 | goto out_id; |
472 | error = sysfs_create_link(&dev->kobj, | 472 | error = sysfs_create_link(&dev->kobj, |
@@ -482,7 +482,7 @@ int bus_add_device(struct device *dev) | |||
482 | out_deprecated: | 482 | out_deprecated: |
483 | sysfs_remove_link(&dev->kobj, "subsystem"); | 483 | sysfs_remove_link(&dev->kobj, "subsystem"); |
484 | out_subsys: | 484 | out_subsys: |
485 | sysfs_remove_link(&bus->p->devices_kset->kobj, dev->bus_id); | 485 | sysfs_remove_link(&bus->p->devices_kset->kobj, dev_name(dev)); |
486 | out_id: | 486 | out_id: |
487 | device_remove_attrs(bus, dev); | 487 | device_remove_attrs(bus, dev); |
488 | out_put: | 488 | out_put: |
@@ -526,13 +526,13 @@ void bus_remove_device(struct device *dev) | |||
526 | sysfs_remove_link(&dev->kobj, "subsystem"); | 526 | sysfs_remove_link(&dev->kobj, "subsystem"); |
527 | remove_deprecated_bus_links(dev); | 527 | remove_deprecated_bus_links(dev); |
528 | sysfs_remove_link(&dev->bus->p->devices_kset->kobj, | 528 | sysfs_remove_link(&dev->bus->p->devices_kset->kobj, |
529 | dev->bus_id); | 529 | dev_name(dev)); |
530 | device_remove_attrs(dev->bus, dev); | 530 | device_remove_attrs(dev->bus, dev); |
531 | if (klist_node_attached(&dev->knode_bus)) | 531 | if (klist_node_attached(&dev->knode_bus)) |
532 | klist_del(&dev->knode_bus); | 532 | klist_del(&dev->knode_bus); |
533 | 533 | ||
534 | pr_debug("bus: '%s': remove device %s\n", | 534 | pr_debug("bus: '%s': remove device %s\n", |
535 | dev->bus->name, dev->bus_id); | 535 | dev->bus->name, dev_name(dev)); |
536 | device_release_driver(dev); | 536 | device_release_driver(dev); |
537 | bus_put(dev->bus); | 537 | bus_put(dev->bus); |
538 | } | 538 | } |