aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/bus.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/base/bus.c')
-rw-r--r--drivers/base/bus.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/base/bus.c b/drivers/base/bus.c
index 64ba9011d1a8..050d86d0b872 100644
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
@@ -374,6 +374,7 @@ int bus_add_device(struct device * dev)
374 error = device_add_attrs(bus, dev); 374 error = device_add_attrs(bus, dev);
375 if (!error) { 375 if (!error) {
376 sysfs_create_link(&bus->devices.kobj, &dev->kobj, dev->bus_id); 376 sysfs_create_link(&bus->devices.kobj, &dev->kobj, dev->bus_id);
377 sysfs_create_link(&dev->kobj, &dev->bus->subsys.kset.kobj, "subsystem");
377 sysfs_create_link(&dev->kobj, &dev->bus->subsys.kset.kobj, "bus"); 378 sysfs_create_link(&dev->kobj, &dev->bus->subsys.kset.kobj, "bus");
378 } 379 }
379 } 380 }
@@ -408,6 +409,7 @@ void bus_attach_device(struct device * dev)
408void bus_remove_device(struct device * dev) 409void bus_remove_device(struct device * dev)
409{ 410{
410 if (dev->bus) { 411 if (dev->bus) {
412 sysfs_remove_link(&dev->kobj, "subsystem");
411 sysfs_remove_link(&dev->kobj, "bus"); 413 sysfs_remove_link(&dev->kobj, "bus");
412 sysfs_remove_link(&dev->bus->devices.kobj, dev->bus_id); 414 sysfs_remove_link(&dev->bus->devices.kobj, dev->bus_id);
413 device_remove_attrs(dev->bus, dev); 415 device_remove_attrs(dev->bus, dev);