Home
last modified time | relevance | path

Searched refs:kobject_add (Results 1 – 23 of 23) sorted by relevance

/linux/Documentation/translations/zh_CN/core-api/
H A Dkobject.rst115 在调用kobject_init()后,为了向sysfs注册kobject,必须调用函数kobject_add()::
117 int kobject_add(struct kobject *kobj, struct kobject *parent,
121 联,在调用kobject_add()之前必须分配kobj->kset。如果kset与kobject相关联,则
122 kobject的父级可以在调用kobject_add()时被设置为NULL,则kobject的父级将是kset
146 参数与上面描述的单个kobject_init()和kobject_add()函数相同。
229 一旦你通过kobject_add()注册了你的kobject,你绝对不能使用kfree()来直接释
344 添加到一个kset中。答案是这个任务是由kobject_add()处理的。当一个
345 kobject被传递给kobject_add()时,它的kset成员应该指向这个kobject
346 所属的kset。 kobject_add()将处理剩下的部分。
/linux/drivers/md/bcache/
H A Dstats.c97 int ret = kobject_add(&acc->total.kobj, parent, in bch_cache_accounting_add_kobjs()
99 ret = ret ?: kobject_add(&acc->five_minute.kobj, parent, in bch_cache_accounting_add_kobjs()
101 ret = ret ?: kobject_add(&acc->hour.kobj, parent, in bch_cache_accounting_add_kobjs()
103 ret = ret ?: kobject_add(&acc->day.kobj, parent, in bch_cache_accounting_add_kobjs()
H A Dsuper.c1458 if (kobject_add(&dc->disk.kobj, bdev_kobj(dc->bdev), "bcache")) in register_bdev()
1543 err = kobject_add(&d->kobj, &disk_to_dev(d->disk)->kobj, "bcache"); in flash_dev_run()
2159 if (kobject_add(&c->kobj, bcache_kobj, "%pU", c->set_uuid) || in register_cache_set()
2160 kobject_add(&c->internal, &c->kobj, "internal")) in register_cache_set()
2369 if (kobject_add(&ca->kobj, bdev_kobj(file_bdev(bdev_file)), "bcache")) { in register_cache()
/linux/drivers/gpu/drm/xe/
H A Dxe_tile_sysfs.c46 err = kobject_add(&kt->base, &dev->kobj, "tile%d", tile->id); in xe_tile_sysfs_init()
H A Dxe_hw_engine_class_sysfs.c514 if (kobject_add(&keclass->base, parent, "%s", name)) { in kobj_xe_hw_engine_class()
547 err = kobject_add(kobj, parent, "%s", ".defaults"); in xe_add_hw_engine_class_defaults()
645 err = kobject_add(kobj, gt->sysfs, "engines"); in xe_hw_engine_class_sysfs_init()
/linux/Documentation/core-api/
H A Dkobject.rst125 register the kobject with sysfs, the function kobject_add() must be called::
127 int kobject_add(struct kobject *kobj, struct kobject *parent,
132 kobj->kset must be assigned before calling kobject_add(). If a kset is
134 NULL in the call to kobject_add() and then the kobject's parent will be the
163 kobject_add() functions described above.
263 Once you registered your kobject via kobject_add(), you must never use
394 that this task is handled by kobject_add(). When a kobject is passed to
395 kobject_add(), its kset member should point to the kset to which the
396 kobject will belong. kobject_add() will handle the rest.
/linux/lib/
H A Dkobject.c327 * be passed to the kobject_add() call.
378 * kobject_add() - The main kobject add function.
410 int kobject_add(struct kobject *kobj, struct kobject *parent, in kobject_add() function
431 EXPORT_SYMBOL(kobject_add);
441 * This function combines the call to kobject_init() and kobject_add().
445 * same type of error handling after a call to kobject_add() and kobject
617 * successfully added via kobject_add().
798 retval = kobject_add(kobj, parent, "%s", name); in kobject_create_and_add()
800 pr_warn("%s: kobject_add error: %d\n", __func__, retval); in kobject_create_and_add()
/linux/drivers/gpu/drm/i915/gt/
H A Dsysfs_engines.c439 if (kobject_add(&ke->base, dir, "%s", engine->name)) { in kobj_engine()
467 if (kobject_add(&ke->base, &parent->base, "%s", ".defaults")) { in add_defaults()
/linux/arch/x86/platform/efi/
H A Druntime-map.c128 ret = kobject_add(&entry->kobj, NULL, "%d", nr); in add_sysfs_runtime_map_entry()
/linux/include/linux/
H A Dkobject.h93 __printf(3, 4) __must_check int kobject_add(struct kobject *kobj,
/linux/kernel/livepatch/
H A Dcore.c817 return kobject_add(&func->kobj, &obj->kobj, "%s,%lu", in klp_write_object_relocs()
922 ret = kobject_add(&obj->kobj, &patch->kobj, "%s", name); in klp_init_object_early()
980 ret = kobject_add(&patch->kobj, klp_root_kobj, "%s", patch->mod->name); in __klp_disable_patch()
/linux/arch/powerpc/platforms/pseries/
H A Dvas-sysfs.c213 ret = kobject_add(&centry->kobj, kobj, "%s", name); in sysfs_add_vas_caps()
/linux/fs/bcachefs/
H A Dsuper.c714 ret = kobject_add(&c->kobj, NULL, "%pU", c->sb.user_uuid.b) ?: in bch2_fs_online()
715 kobject_add(&c->internal, &c->kobj, "internal") ?: in bch2_fs_online()
716 kobject_add(&c->opts_dir, &c->kobj, "options") ?: in bch2_fs_online()
718 kobject_add(&c->time_stats, &c->kobj, "time_stats") ?: in bch2_fs_online()
720 kobject_add(&c->counters_kobj, &c->kobj, "counters") ?: in bch2_fs_online()
1283 ret = kobject_add(&ca->kobj, &c->kobj, in bch2_dev_sysfs_online()
/linux/arch/powerpc/kernel/
H A Dsecvar-sysfs.c172 rc = kobject_add(kobj, &secvar_kset->kobj, "%s", name); in add_var()
/linux/arch/powerpc/platforms/powernv/
H A Dopal-elog.c225 rc = kobject_add(&elog->kobj, NULL, "0x%llx", id); in create_elog_obj()
H A Dopal-dump.c351 rc = kobject_add(&dump->kobj, NULL, "0x%x-0x%x", type, id); in create_dump_obj()
/linux/drivers/uio/
H A Duio.c317 ret = kobject_add(&map->kobj, idev->map_dir, "map%d", mi); in uio_dev_add_attributes()
346 ret = kobject_add(&portio->kobj, idev->portio_dir, in uio_dev_add_attributes()
/linux/sound/hda/
H A Dhdac_sysfs.c348 err = kobject_add(kobj, parent, "%02x", nid); in add_widget_node()
/linux/drivers/infiniband/core/
H A Dsysfs.c1170 ret = kobject_add(&gid_attr_group->kobj, &port->kobj, "gid_attrs"); in setup_gid_attrs()
1255 ret = kobject_add(&p->kobj, coredev->ports_kobj, "%d", port_num); in setup_port()
/linux/block/
H A Dblk-sysfs.c766 ret = kobject_add(&disk->queue_kobj, &disk_to_dev(disk)->kobj, "queue"); in blk_register_queue()
/linux/drivers/base/
H A Dcore.c3209 retval = kobject_add(&dir->kobj, parent_kobj, "%s", sp->class->name); in class_dir_create_and_add()
3604 error = kobject_add(&dev->kobj, dev->kobj.parent, NULL); in device_add()
/linux/fs/btrfs/
H A Dsysfs.c1895 ret = kobject_add(&rkobj->kobj, &space_info->kobj, "%s", in btrfs_sysfs_add_block_group_type()
/linux/drivers/gpu/drm/amd/amdgpu/
H A Damdgpu_discovery.c1104 res = kobject_add(&ip_hw_instance->kobj, NULL, in amdgpu_discovery_sysfs_ips()