Lines Matching refs:parent

24  * Returns namespace tag of @kobj if its parent has namespace ops enabled
132 struct kobject *parent = kobj;
139 if (kobject_name(parent) == NULL)
141 length += strlen(kobject_name(parent)) + 1;
142 parent = parent->parent;
143 } while (parent);
149 struct kobject *parent;
152 for (parent = kobj; parent; parent = parent->parent) {
153 int cur = strlen(kobject_name(parent));
158 memcpy(path + length, kobject_name(parent), cur);
236 struct kobject *parent;
248 parent = kobject_get(kobj->parent);
250 /* join kset if set, use it as parent if we do not already have one */
252 if (!parent)
253 parent = kobject_get(&kobj->kset->kobj);
255 kobj->parent = parent;
258 pr_debug("kobject: '%s' (%p): %s: parent: '%s', set: '%s'\n",
260 parent ? kobject_name(parent) : "<NULL>",
266 kobject_put(parent);
267 kobj->parent = NULL;
274 pr_err("%s failed for %s (error: %d parent: %s)\n",
276 parent ? kobject_name(parent) : "'none'");
387 struct kobject *parent,
397 kobj->parent = parent;
404 * @parent: pointer to the parent of the kobject.
410 * If @parent is set, then the parent of the @kobj will be set to it.
411 * If @parent is NULL, then the parent of the @kobj will be set to the
434 int kobject_add(struct kobject *kobj, struct kobject *parent,
450 retval = kobject_add_varg(kobj, parent, fmt, args);
462 * @parent: pointer to the parent of this kobject.
473 struct kobject *parent, const char *fmt, ...)
481 retval = kobject_add_varg(kobj, parent, fmt, args);
509 if (!kobj->parent) {
558 * kobject_move() - Move object to another parent.
560 * @new_parent: object's new parent (can be NULL)
596 old_parent = kobj->parent;
597 kobj->parent = new_parent;
633 kobj->parent = NULL;
645 struct kobject *parent;
650 parent = kobj->parent;
652 kobject_put(parent);
689 struct kobject *parent = kobj->parent;
693 pr_debug("kobject: '%s' (%p): %s, parent %p\n",
694 kobject_name(kobj), kobj, __func__, kobj->parent);
706 /* avoid dropping the parent reference unnecessarily */
707 parent = NULL;
722 kobject_put(parent);
738 pr_info("kobject: '%s' (%p): %s, parent %p (delayed %ld)\n",
739 kobject_name(kobj), kobj, __func__, kobj->parent, delay);
804 * @parent: the parent kobject of this kobject, if any.
813 struct kobject *kobject_create_and_add(const char *name, struct kobject *parent)
822 retval = kobject_add(kobj, parent, "%s", name);
950 if (kobj->parent)
951 kobject_get_ownership(kobj->parent, uid, gid);
965 * @parent_kobj: the parent kobject of this kset, if any.
991 kset->kobj.parent = parent_kobj;
1009 * @parent_kobj: the parent kobject of this kset, if any.
1080 const struct kobj_ns_type_operations *kobj_child_ns_ops(struct kobject *parent)
1084 if (parent && parent->ktype && parent->ktype->child_ns_type)
1085 ops = parent->ktype->child_ns_type(parent);
1092 return kobj_child_ns_ops(kobj->parent);