Lines Matching defs:kobject

3  * kobject.h - generic kernel object infrastructure.
10 * Please read Documentation/core-api/kobject.rst before using the kobject
40 /* counter to tag the uevent, read only except for the kobject core */
64 struct kobject {
67 struct kobject *parent;
84 __printf(2, 3) int kobject_set_name(struct kobject *kobj, const char *name, ...);
85 __printf(2, 0) int kobject_set_name_vargs(struct kobject *kobj, const char *fmt, va_list vargs);
87 static inline const char *kobject_name(const struct kobject *kobj)
92 void kobject_init(struct kobject *kobj, const struct kobj_type *ktype);
93 __printf(3, 4) __must_check int kobject_add(struct kobject *kobj,
94 struct kobject *parent,
96 __printf(4, 5) __must_check int kobject_init_and_add(struct kobject *kobj,
98 struct kobject *parent,
101 void kobject_del(struct kobject *kobj);
103 struct kobject * __must_check kobject_create_and_add(const char *name, struct kobject *parent);
105 int __must_check kobject_rename(struct kobject *, const char *new_name);
106 int __must_check kobject_move(struct kobject *, struct kobject *);
108 struct kobject *kobject_get(struct kobject *kobj);
109 struct kobject * __must_check kobject_get_unless_zero(struct kobject *kobj);
110 void kobject_put(struct kobject *kobj);
112 const void *kobject_namespace(const struct kobject *kobj);
113 void kobject_get_ownership(const struct kobject *kobj, kuid_t *uid, kgid_t *gid);
114 char *kobject_get_path(const struct kobject *kobj, gfp_t flag);
117 void (*release)(struct kobject *kobj);
120 const struct kobj_ns_type_operations *(*child_ns_type)(const struct kobject *kobj);
121 const void *(*namespace)(const struct kobject *kobj);
122 void (*get_ownership)(const struct kobject *kobj, kuid_t *uid, kgid_t *gid);
134 int (* const filter)(const struct kobject *kobj);
135 const char *(* const name)(const struct kobject *kobj);
136 int (* const uevent)(const struct kobject *kobj, struct kobj_uevent_env *env);
141 ssize_t (*show)(struct kobject *kobj, struct kobj_attribute *attr,
143 ssize_t (*store)(struct kobject *kobj, struct kobj_attribute *attr,
158 * a kobject.
162 * @kobj: the embedded kobject for this kset (recursion, isn't it fun...)
164 * called whenever a kobject has something happen to it so that the kset
171 struct kobject kobj;
179 struct kobject *parent_kobj);
181 static inline struct kset *to_kset(struct kobject *kobj)
196 static inline const struct kobj_type *get_ktype(const struct kobject *kobj)
201 struct kobject *kset_find_obj(struct kset *, const char *);
203 /* The global /sys/kernel/ kobject for people to chain off of */
204 extern struct kobject *kernel_kobj;
205 /* The global /sys/kernel/mm/ kobject for people to chain off of */
206 extern struct kobject *mm_kobj;
207 /* The global /sys/hypervisor/ kobject for people to chain off of */
208 extern struct kobject *hypervisor_kobj;
209 /* The global /sys/power/ kobject for people to chain off of */
210 extern struct kobject *power_kobj;
211 /* The global /sys/firmware/ kobject for people to chain off of */
212 extern struct kobject *firmware_kobj;
214 int kobject_uevent(struct kobject *kobj, enum kobject_action action);
215 int kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
217 int kobject_synth_uevent(struct kobject *kobj, const char *buf, size_t count);