klist_add_tail(&parent->klist_children, &dev->knode_parent); 
klist_add_tail(&dev->knode_parent, &parent->klist_children); 
int device_add(struct device *dev){	struct device *parent = NULL;	int error = -EINVAL;	dev = get_device(dev);	if (!dev || !strlen(dev->bus_id))		goto Error;	parent = get_device(dev->parent);	pr_debug("DEV: registering device: ID = '%s'\n", dev->bus_id);	/* first, register with generic layer. */	kobject_set_name(&dev->kobj, "%s", dev->bus_id);	if (parent)		dev->kobj.parent = &parent->kobj;	if ((error = kobject_add(&dev->kobj)))		goto Error;	kobject_hotplug(&dev->kobj, KOBJ_ADD);	if ((error = device_pm_add(dev)))		goto PMError;	if ((error = bus_add_device(dev)))		goto BusError;	if (parent)		klist_add_tail(&parent->klist_children, &dev->knode_parent);	/* notify platform of device entry */	if (platform_notify)		platform_notify(dev); Done:	put_device(dev);	return error; BusError:	device_pm_remove(dev); PMError:	kobject_hotplug(&dev->kobj, KOBJ_REMOVE);	kobject_del(&dev->kobj); Error:	if (parent)		put_device(parent);	goto Done;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/d856f1e337782326c638c70c0b4df2b909350dec/core.c/clean/drivers/base/core.c