/linux/Documentation/translations/zh_CN/core-api/ |
A D | kobject.rst | 115 在调用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()来直接释 346 添加到一个kset中。答案是这个任务是由kobject_add()处理的。当一个 347 kobject被传递给kobject_add()时,它的kset成员应该指向这个kobject 348 所属的kset。 kobject_add()将处理剩下的部分。
|
/linux/drivers/md/bcache/ |
A D | stats.c | 96 int ret = kobject_add(&acc->total.kobj, parent, in bch_cache_accounting_add_kobjs() 98 ret = ret ?: kobject_add(&acc->five_minute.kobj, parent, in bch_cache_accounting_add_kobjs() 100 ret = ret ?: kobject_add(&acc->hour.kobj, parent, in bch_cache_accounting_add_kobjs() 102 ret = ret ?: kobject_add(&acc->day.kobj, parent, in bch_cache_accounting_add_kobjs()
|
A D | super.c | 1469 if (kobject_add(&dc->disk.kobj, bdev_kobj(bdev), "bcache")) in register_bdev() 1554 err = kobject_add(&d->kobj, &disk_to_dev(d->disk)->kobj, "bcache"); in flash_dev_run() 2169 if (kobject_add(&c->kobj, bcache_kobj, "%pU", c->set_uuid) || in register_cache_set() 2170 kobject_add(&c->internal, &c->kobj, "internal")) in register_cache_set() 2377 if (kobject_add(&ca->kobj, bdev_kobj(bdev), "bcache")) { in register_cache()
|
/linux/block/ |
A D | blk-mq-sysfs.c | 195 ret = kobject_add(&hctx->kobj, q->mq_kobj, "%u", hctx->queue_num); in blk_mq_register_hctx() 200 ret = kobject_add(&ctx->kobj, &hctx->kobj, "cpu%u", ctx->cpu); in blk_mq_register_hctx() 265 ret = kobject_add(q->mq_kobj, kobject_get(&dev->kobj), "%s", "mq"); in __blk_mq_register_dev()
|
A D | elevator.c | 497 error = kobject_add(&e->kobj, &q->kobj, "%s", "iosched"); in elv_register_queue()
|
/linux/Documentation/core-api/ |
A D | kobject.rst | 125 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 396 that this task is handled by kobject_add(). When a kobject is passed to 397 kobject_add(), its kset member should point to the kset to which the 398 kobject will belong. kobject_add() will handle the rest.
|
/linux/drivers/gpu/drm/i915/gt/ |
A D | sysfs_engines.c | 436 if (kobject_add(&ke->base, dir, "%s", engine->name)) { in kobj_engine() 464 if (kobject_add(&ke->base, &parent->base, "%s", ".defaults")) { in add_defaults()
|
/linux/lib/ |
A D | kobject.c | 426 int kobject_add(struct kobject *kobj, struct kobject *parent, in kobject_add() function 447 EXPORT_SYMBOL(kobject_add); 814 retval = kobject_add(kobj, parent, "%s", name); in kobject_create_and_add()
|
A D | lib.a | 3 …tklist_prevklist_nextkobject_get_pathkobject_set_namekobject_initkobject_addkobject_init_an…
|
/linux/drivers/of/ |
A D | kobj.c | 137 rc = kobject_add(&np->kobj, parent, "%s", name); in __of_attach_node_sysfs()
|
/linux/drivers/firmware/efi/ |
A D | runtime-map.c | 127 ret = kobject_add(&entry->kobj, NULL, "%d", nr); in add_sysfs_runtime_map_entry()
|
/linux/include/linux/ |
A D | kobject.h | 95 int kobject_add(struct kobject *kobj, struct kobject *parent,
|
/linux/drivers/platform/x86/ |
A D | think-lmi.c | 798 ret = kobject_add(&tlmi_priv.setting[i]->kobj, NULL, in tlmi_sysfs_init() 825 ret = kobject_add(&tlmi_priv.pwd_admin->kobj, NULL, "%s", "Admin"); in tlmi_sysfs_init() 834 ret = kobject_add(&tlmi_priv.pwd_power->kobj, NULL, "%s", "System"); in tlmi_sysfs_init()
|
/linux/kernel/livepatch/ |
A D | core.c | 742 return kobject_add(&func->kobj, &obj->kobj, "%s,%lu", in klp_init_func() 834 ret = kobject_add(&obj->kobj, &patch->kobj, "%s", name); in klp_init_object() 903 ret = kobject_add(&patch->kobj, klp_root_kobj, "%s", patch->mod->name); in klp_init_patch()
|
/linux/arch/powerpc/kernel/ |
A D | secvar-sysfs.c | 192 rc = kobject_add(kobj, &secvar_kset->kobj, "%s", name); in secvar_sysfs_load()
|
/linux/drivers/firmware/ |
A D | memmap.c | 190 if (kobject_add(&entry->kobj, NULL, "%d", map_entries_nr++)) in add_sysfs_fw_map_entry()
|
A D | turris-mox-rwtm.c | 119 if (kobject_add(rwtm_to_kobj(rwtm), firmware_kobj, "turris-mox-rwtm")) { in mox_kobj_create()
|
/linux/arch/x86/kernel/cpu/mce/ |
A D | amd.c | 1328 err = kobject_add(&b->blocks->kobj, b->kobj, b->blocks->kobj.name); in __threshold_add_blocks() 1334 err = kobject_add(&pos->kobj, b->kobj, pos->kobj.name); in __threshold_add_blocks() 1364 err = kobject_add(b->kobj, &dev->kobj, name); in threshold_create_bank()
|
/linux/arch/powerpc/platforms/powernv/ |
A D | opal-elog.c | 224 rc = kobject_add(&elog->kobj, NULL, "0x%llx", id); in create_elog_obj()
|
A D | opal-dump.c | 350 rc = kobject_add(&dump->kobj, NULL, "0x%x-0x%x", type, id); in create_dump_obj()
|
/linux/crypto/ |
A D | pcrypt.c | 312 ret = kobject_add(&pinst->kobj, NULL, "%s", name); in pcrypt_sysfs_add()
|
/linux/arch/arm64/kernel/ |
A D | cpuinfo.c | 281 rc = kobject_add(&info->kobj, &dev->kobj, "regs"); in cpuid_cpu_online()
|
/linux/drivers/uio/ |
A D | uio.c | 314 ret = kobject_add(&map->kobj, idev->map_dir, "map%d", mi); in uio_dev_add_attributes() 343 ret = kobject_add(&portio->kobj, idev->portio_dir, in uio_dev_add_attributes()
|
/linux/sound/hda/ |
A D | hdac_sysfs.c | 348 err = kobject_add(kobj, parent, "%02x", nid); in add_widget_node()
|
/linux/drivers/infiniband/core/ |
A D | sysfs.c | 1165 ret = kobject_add(&gid_attr_group->kobj, &port->kobj, "gid_attrs"); in setup_gid_attrs() 1247 ret = kobject_add(&p->kobj, coredev->ports_kobj, "%d", port_num); in setup_port()
|