int bus_add_device(struct device *dev) { struct bus_type *bus = get_bus(dev->bus); int error = 0; if (bus) { ... sysfs_create_link(&bus->device.kobj, &dev->kobj, dev->bus_id); } return error; }