Lines Matching refs:kobj

129 kobject_set_name_vargs(struct kobject *kobj, const char *fmt, va_list args)  in kobject_set_name_vargs()  argument
137 old = kobj->name; in kobject_set_name_vargs()
159 kobj->name = name; in kobject_set_name_vargs()
172 kobject_set_name(struct kobject *kobj, const char *fmt, ...) in kobject_set_name() argument
178 error = kobject_set_name_vargs(kobj, fmt, args); in kobject_set_name()
185 kobject_add_complete(struct kobject *kobj, struct kobject *parent) in kobject_add_complete() argument
190 kobj->parent = parent; in kobject_add_complete()
191 error = sysfs_create_dir(kobj); in kobject_add_complete()
192 if (error == 0 && kobj->ktype && kobj->ktype->default_attrs) { in kobject_add_complete()
194 t = kobj->ktype; in kobject_add_complete()
197 error = sysfs_create_file(kobj, *attr); in kobject_add_complete()
202 sysfs_remove_dir(kobj); in kobject_add_complete()
209 kobject_add(struct kobject *kobj, struct kobject *parent, const char *fmt, ...) in kobject_add() argument
215 error = kobject_set_name_vargs(kobj, fmt, args); in kobject_add()
220 return kobject_add_complete(kobj, parent); in kobject_add()
226 struct kobject *kobj; in linux_kobject_release() local
229 kobj = container_of(kref, struct kobject, kref); in linux_kobject_release()
230 sysfs_remove_dir(kobj); in linux_kobject_release()
231 name = kobj->name; in linux_kobject_release()
232 if (kobj->ktype && kobj->ktype->release) in linux_kobject_release()
233 kobj->ktype->release(kobj); in linux_kobject_release()
238 linux_kobject_kfree(struct kobject *kobj) in linux_kobject_kfree() argument
240 kfree(kobj); in linux_kobject_kfree()
244 linux_kobject_kfree_name(struct kobject *kobj) in linux_kobject_kfree_name() argument
246 if (kobj) { in linux_kobject_kfree_name()
247 kfree(kobj->name); in linux_kobject_kfree_name()
263 linux_class_show(struct kobject *kobj, struct attribute *attr, char *buf) in linux_class_show() argument
271 error = dattr->show(container_of(kobj, struct class, kobj), in linux_class_show()
277 linux_class_store(struct kobject *kobj, struct attribute *attr, const char *buf, in linux_class_store() argument
286 error = dattr->store(container_of(kobj, struct class, kobj), in linux_class_store()
292 linux_class_release(struct kobject *kobj) in linux_class_release() argument
296 class = container_of(kobj, struct class, kobj); in linux_class_release()
312 linux_dev_release(struct kobject *kobj) in linux_dev_release() argument
316 dev = container_of(kobj, struct device, kobj); in linux_dev_release()
325 linux_dev_show(struct kobject *kobj, struct attribute *attr, char *buf) in linux_dev_show() argument
333 error = dattr->show(container_of(kobj, struct device, kobj), in linux_dev_show()
339 linux_dev_store(struct kobject *kobj, struct attribute *attr, const char *buf, in linux_dev_store() argument
348 error = dattr->store(container_of(kobj, struct device, kobj), in linux_dev_store()
377 kobject_set_name_vargs(&dev->kobj, fmt, args); in device_create()
385 kobject_init_and_add(struct kobject *kobj, const struct kobj_type *ktype, in kobject_init_and_add() argument
391 kobject_init(kobj, ktype); in kobject_init_and_add()
392 kobj->ktype = ktype; in kobject_init_and_add()
393 kobj->parent = parent; in kobject_init_and_add()
394 kobj->name = NULL; in kobject_init_and_add()
397 error = kobject_set_name_vargs(kobj, fmt, args); in kobject_init_and_add()
401 return kobject_add_complete(kobj, parent); in kobject_init_and_add()
2092 linux_cdev_release(struct kobject *kobj) in linux_cdev_release() argument
2097 cdev = container_of(kobj, struct linux_cdev, kobj); in linux_cdev_release()
2098 parent = kobj->parent; in linux_cdev_release()
2105 linux_cdev_static_release(struct kobject *kobj) in linux_cdev_static_release() argument
2110 cdev = container_of(kobj, struct linux_cdev, kobj); in linux_cdev_static_release()
2111 parent = kobj->parent; in linux_cdev_static_release()
2327 strcmp(kobject_name(&ldev->kobj), name) == 0) { in linux_find_cdev()
2348 kobject_set_name(&cdev->kobj, name); in __register_chrdev()
2370 kobject_set_name(&cdev->kobj, name); in __register_chrdev_p()
2426 kobject_init(&linux_root_device.kobj, &linux_dev_ktype); in linux_compat_init()
2427 kobject_set_name(&linux_root_device.kobj, "device"); in linux_compat_init()
2428 linux_root_device.kobj.oidp = SYSCTL_ADD_NODE(NULL, in linux_compat_init()
2447 linux_kobject_kfree_name(&linux_root_device.kobj); in linux_compat_uninit()
2448 linux_kobject_kfree_name(&linux_class_misc.kobj); in linux_compat_uninit()