Lines Matching refs:parent

26  * Returns namespace tag of @kobj if its parent has namespace ops enabled
109 const struct kobject *parent = kobj;
116 if (kobject_name(parent) == NULL)
118 length += strlen(kobject_name(parent)) + 1;
119 parent = parent->parent;
120 } while (parent);
126 const struct kobject *parent;
129 for (parent = kobj; parent; parent = parent->parent) {
130 int cur = strlen(kobject_name(parent));
135 memcpy(path + length, kobject_name(parent), cur);
213 struct kobject *parent;
225 parent = kobject_get(kobj->parent);
227 /* join kset if set, use it as parent if we do not already have one */
229 if (!parent)
230 parent = kobject_get(&kobj->kset->kobj);
232 kobj->parent = parent;
235 pr_debug("'%s' (%p): %s: parent: '%s', set: '%s'\n",
237 parent ? kobject_name(parent) : "<NULL>",
243 kobject_put(parent);
244 kobj->parent = NULL;
251 pr_err("%s failed for %s (error: %d parent: %s)\n",
253 parent ? kobject_name(parent) : "'none'");
363 struct kobject *parent,
373 kobj->parent = parent;
380 * @parent: pointer to the parent of the kobject.
386 * If @parent is set, then the parent of the @kobj will be set to it.
387 * If @parent is NULL, then the parent of the @kobj will be set to the
410 int kobject_add(struct kobject *kobj, struct kobject *parent,
426 retval = kobject_add_varg(kobj, parent, fmt, args);
438 * @parent: pointer to the parent of this kobject.
449 struct kobject *parent, const char *fmt, ...)
457 retval = kobject_add_varg(kobj, parent, fmt, args);
485 if (!kobj->parent) {
534 * kobject_move() - Move object to another parent.
536 * @new_parent: object's new parent (can be NULL)
572 old_parent = kobj->parent;
573 kobj->parent = new_parent;
609 kobj->parent = NULL;
621 struct kobject *parent;
626 parent = kobj->parent;
628 kobject_put(parent);
665 struct kobject *parent = kobj->parent;
669 pr_debug("'%s' (%p): %s, parent %p\n",
670 kobject_name(kobj), kobj, __func__, kobj->parent);
682 /* avoid dropping the parent reference unnecessarily */
683 parent = NULL;
698 kobject_put(parent);
714 pr_info("'%s' (%p): %s, parent %p (delayed %ld)\n",
715 kobject_name(kobj), kobj, __func__, kobj->parent, delay);
780 * @parent: the parent kobject of this kobject, if any.
789 struct kobject *kobject_create_and_add(const char *name, struct kobject *parent)
798 retval = kobject_add(kobj, parent, "%s", name);
933 if (kobj->parent)
934 kobject_get_ownership(kobj->parent, uid, gid);
948 * @parent_kobj: the parent kobject of this kset, if any.
974 kset->kobj.parent = parent_kobj;
992 * @parent_kobj: the parent kobject of this kset, if any.
1059 const struct kobj_ns_type_operations *kobj_child_ns_ops(const struct kobject *parent)
1063 if (parent && parent->ktype && parent->ktype->child_ns_type)
1064 ops = parent->ktype->child_ns_type(parent);
1071 return kobj_child_ns_ops(kobj->parent);