/linux-6.3-rc2/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()来直接释 344 添加到一个kset中。答案是这个任务是由kobject_add()处理的。当一个 345 kobject被传递给kobject_add()时,它的kset成员应该指向这个kobject 346 所属的kset。 kobject_add()将处理剩下的部分。
|
/linux-6.3-rc2/drivers/md/bcache/ |
A D | stats.c | 97 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()
|
A D | super.c | 1464 if (kobject_add(&dc->disk.kobj, bdev_kobj(bdev), "bcache")) in register_bdev() 1549 err = kobject_add(&d->kobj, &disk_to_dev(d->disk)->kobj, "bcache"); in flash_dev_run() 2165 if (kobject_add(&c->kobj, bcache_kobj, "%pU", c->set_uuid) || in register_cache_set() 2166 kobject_add(&c->internal, &c->kobj, "internal")) in register_cache_set() 2373 if (kobject_add(&ca->kobj, bdev_kobj(bdev), "bcache")) { in register_cache()
|
/linux-6.3-rc2/block/ |
A D | blk-mq-sysfs.c | 169 ret = kobject_add(&hctx->kobj, q->mq_kobj, "%u", hctx->queue_num); in blk_mq_register_hctx() 174 ret = kobject_add(&ctx->kobj, &hctx->kobj, "cpu%u", ctx->cpu); in blk_mq_register_hctx() 230 ret = kobject_add(q->mq_kobj, &disk_to_dev(disk)->kobj, "mq"); in blk_mq_sysfs_register()
|
A D | elevator.c | 470 error = kobject_add(&e->kobj, &q->disk->queue_kobj, "iosched"); in elv_register_queue()
|
/linux-6.3-rc2/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 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-6.3-rc2/drivers/platform/x86/ |
A D | think-lmi.c | 1246 ret = kobject_add(&tlmi_priv.setting[i]->kobj, NULL, in tlmi_sysfs_init() 1274 ret = kobject_add(&tlmi_priv.pwd_admin->kobj, NULL, "%s", "Admin"); in tlmi_sysfs_init() 1283 ret = kobject_add(&tlmi_priv.pwd_power->kobj, NULL, "%s", "Power-on"); in tlmi_sysfs_init() 1293 ret = kobject_add(&tlmi_priv.pwd_system->kobj, NULL, "%s", "System"); in tlmi_sysfs_init() 1302 ret = kobject_add(&tlmi_priv.pwd_hdd->kobj, NULL, "%s", "HDD"); in tlmi_sysfs_init() 1311 ret = kobject_add(&tlmi_priv.pwd_nvme->kobj, NULL, "%s", "NVMe"); in tlmi_sysfs_init()
|
/linux-6.3-rc2/drivers/of/ |
A D | kobj.c | 137 rc = kobject_add(&np->kobj, parent, "%s", name); in __of_attach_node_sysfs()
|
/linux-6.3-rc2/arch/x86/platform/efi/ |
A D | runtime-map.c | 128 ret = kobject_add(&entry->kobj, NULL, "%d", nr); in add_sysfs_runtime_map_entry()
|
/linux-6.3-rc2/include/linux/ |
A D | kobject.h | 95 int kobject_add(struct kobject *kobj, struct kobject *parent,
|
/linux-6.3-rc2/drivers/gpu/drm/i915/gt/ |
A D | sysfs_engines.c | 441 if (kobject_add(&ke->base, dir, "%s", engine->name)) { in kobj_engine() 469 if (kobject_add(&ke->base, &parent->base, "%s", ".defaults")) { in add_defaults()
|
/linux-6.3-rc2/lib/ |
A D | kobject.c | 402 int kobject_add(struct kobject *kobj, struct kobject *parent, in kobject_add() function 423 EXPORT_SYMBOL(kobject_add); 790 retval = kobject_add(kobj, parent, "%s", name); in kobject_create_and_add()
|
/linux-6.3-rc2/arch/powerpc/platforms/pseries/ |
A D | vas-sysfs.c | 213 ret = kobject_add(¢ry->kobj, kobj, "%s", name); in sysfs_add_vas_caps()
|
/linux-6.3-rc2/kernel/livepatch/ |
A D | core.c | 782 return kobject_add(&func->kobj, &obj->kobj, "%s,%lu", in klp_init_func() 887 ret = kobject_add(&obj->kobj, &patch->kobj, "%s", name); in klp_init_object() 945 ret = kobject_add(&patch->kobj, klp_root_kobj, "%s", patch->mod->name); in klp_init_patch()
|
/linux-6.3-rc2/arch/powerpc/kernel/ |
A D | secvar-sysfs.c | 172 rc = kobject_add(kobj, &secvar_kset->kobj, "%s", name); in add_var()
|
/linux-6.3-rc2/drivers/firmware/ |
A D | memmap.c | 191 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-6.3-rc2/arch/x86/kernel/cpu/mce/ |
A D | amd.c | 1152 err = kobject_add(&b->blocks->kobj, b->kobj, b->blocks->kobj.name); in __threshold_add_blocks() 1158 err = kobject_add(&pos->kobj, b->kobj, pos->kobj.name); in __threshold_add_blocks() 1188 err = kobject_add(b->kobj, &dev->kobj, name); in threshold_create_bank()
|
/linux-6.3-rc2/arch/powerpc/platforms/powernv/ |
A D | opal-elog.c | 225 rc = kobject_add(&elog->kobj, NULL, "0x%llx", id); in create_elog_obj()
|
A D | opal-dump.c | 351 rc = kobject_add(&dump->kobj, NULL, "0x%x-0x%x", type, id); in create_dump_obj()
|
/linux-6.3-rc2/crypto/ |
A D | pcrypt.c | 312 ret = kobject_add(&pinst->kobj, NULL, "%s", name); in pcrypt_sysfs_add()
|
/linux-6.3-rc2/arch/arm64/kernel/ |
A D | cpuinfo.c | 330 rc = kobject_add(&info->kobj, &dev->kobj, "regs"); in cpuid_cpu_online()
|
/linux-6.3-rc2/drivers/uio/ |
A D | uio.c | 316 ret = kobject_add(&map->kobj, idev->map_dir, "map%d", mi); in uio_dev_add_attributes() 345 ret = kobject_add(&portio->kobj, idev->portio_dir, in uio_dev_add_attributes()
|
/linux-6.3-rc2/sound/hda/ |
A D | hdac_sysfs.c | 348 err = kobject_add(kobj, parent, "%02x", nid); in add_widget_node()
|
/linux-6.3-rc2/drivers/infiniband/core/ |
A D | sysfs.c | 1166 ret = kobject_add(&gid_attr_group->kobj, &port->kobj, "gid_attrs"); in setup_gid_attrs() 1251 ret = kobject_add(&p->kobj, coredev->ports_kobj, "%d", port_num); in setup_port()
|