Lines Matching refs:parent

130 	while (target->parent) {
131 target = target->parent;
154 * missing from the list of children of its parent device.
1399 consumer->parent);
1984 while (!top_kobj->kset && top_kobj->parent)
1985 top_kobj = top_kobj->parent;
2562 struct device *parent)
2572 if (parent && parent->class == &block_class)
2573 return &parent->kobj;
2579 * If we have no parent, we live in "virtual".
2580 * Class-devices with a non class-device as parent, live
2583 if (parent == NULL)
2585 else if (parent->class && !dev->class->ns_type)
2586 return &parent->kobj;
2588 parent_kobj = &parent->kobj;
2592 /* find our class-directory at the parent and reference it */
2595 if (k->parent == parent_kobj) {
2605 /* or create a new class-directory at the parent device */
2613 if (!parent && dev->bus && dev->bus->dev_root)
2616 if (parent)
2617 return &parent->kobj;
2632 return dev->kobj.parent;
2725 if (dev->parent && device_is_not_partition(dev)) {
2726 error = sysfs_create_link(&dev->kobj, &dev->parent->kobj,
2764 if (dev->parent && device_is_not_partition(dev))
2880 struct device *parent;
2917 parent = get_device(dev->parent);
2918 kobj = get_device_parent(dev, parent);
2924 dev->kobj.parent = kobj;
2926 /* use parent numa_node */
2927 if (parent && (dev_to_node(dev) == NUMA_NO_NODE))
2928 set_dev_node(dev, dev_to_node(parent));
2932 error = kobject_add(&dev->kobj, dev->kobj.parent, NULL);
3000 if (parent)
3002 &parent->p->klist_children);
3043 put_device(parent);
3135 struct device *parent = dev->parent;
3156 if (parent)
3193 put_device(parent);
3289 * @parent: parent struct device.
3293 * Iterate over @parent's child devices, and call @fn for each,
3299 int device_for_each_child(struct device *parent, void *data,
3306 if (!parent->p)
3309 klist_iter_init(&parent->p->klist_children, &i);
3319 * @parent: parent struct device.
3323 * Iterate over @parent's child devices, and call @fn for each,
3329 int device_for_each_child_reverse(struct device *parent, void *data,
3336 if (!parent->p)
3339 klist_iter_init(&parent->p->klist_children, &i);
3349 * @parent: parent struct device
3364 struct device *device_find_child(struct device *parent, void *data,
3370 if (!parent)
3373 klist_iter_init(&parent->p->klist_children, &i);
3384 * @parent: parent struct device
3392 struct device *device_find_child_by_name(struct device *parent,
3398 if (!parent)
3401 klist_iter_init(&parent->p->klist_children, &i);
3543 * allocate a root device and then use it as the parent of
3620 device_create_groups_vargs(struct class *class, struct device *parent,
3640 dev->parent = parent;
3663 * @parent: pointer to the parent struct device of this new device, if any
3673 * If a pointer to a parent struct device is passed in, the newly created
3684 struct device *device_create(struct class *class, struct device *parent,
3691 dev = device_create_groups_vargs(class, parent, devt, drvdata, NULL,
3701 * @parent: pointer to the parent struct device of this new device, if any
3714 * If a pointer to a parent struct device is passed in, the newly created
3726 struct device *parent, dev_t devt,
3735 dev = device_create_groups_vargs(class, parent, devt, drvdata, groups,
3855 * device_move - moves a device to a new parent
3857 * @new_parent: the new parent of the device (can be NULL)
3888 old_parent = dev->parent;
3889 dev->parent = new_parent;
3906 dev->parent = old_parent;
4068 struct device *dev, *parent;
4086 * hold reference count of device's parent to
4087 * prevent it from being freed because parent's
4090 parent = get_device(dev->parent);
4100 if (parent)
4101 device_lock(parent);
4124 if (parent)
4125 device_unlock(parent);
4128 put_device(parent);
4328 struct device *parent = dev->parent;
4343 if (!(parent && fn == parent->fwnode))