Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 39878
b: refs/heads/master
c: 513e733
h: refs/heads/master
v: v3
  • Loading branch information
Cornelia Huck authored and Greg Kroah-Hartman committed Oct 18, 2006
1 parent 462edd2 commit a29798b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 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: 1bb6881acae1c4f11a6e86f04df32ba45e95031d
refs/heads/master: 513e7337adc32cdfbffecb99953e45a44e812c2d
19 changes: 15 additions & 4 deletions trunk/drivers/base/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -372,19 +372,30 @@ int bus_add_device(struct device * dev)
pr_debug("bus %s: add device %s\n", bus->name, dev->bus_id);
error = device_add_attrs(bus, dev);
if (error)
goto out;
goto out_put;
error = sysfs_create_link(&bus->devices.kobj,
&dev->kobj, dev->bus_id);
if (error)
goto out;
goto out_id;
error = sysfs_create_link(&dev->kobj,
&dev->bus->subsys.kset.kobj, "subsystem");
if (error)
goto out;
goto out_subsys;
error = sysfs_create_link(&dev->kobj,
&dev->bus->subsys.kset.kobj, "bus");
if (error)
goto out_deprecated;
}
out:
return 0;

out_deprecated:
sysfs_remove_link(&dev->kobj, "subsystem");
out_subsys:
sysfs_remove_link(&bus->devices.kobj, dev->bus_id);
out_id:
device_remove_attrs(bus, dev);
out_put:
put_bus(dev->bus);
return error;
}

Expand Down

0 comments on commit a29798b

Please sign in to comment.