Home
last modified time | relevance | path

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

12

/linux-5.19.10/Documentation/translations/zh_CN/core-api/
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-5.19.10/drivers/md/bcache/
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()
Dsuper.c1465 if (kobject_add(&dc->disk.kobj, bdev_kobj(bdev), "bcache")) in register_bdev()
1550 err = kobject_add(&d->kobj, &disk_to_dev(d->disk)->kobj, "bcache"); in flash_dev_run()
2166 if (kobject_add(&c->kobj, bcache_kobj, "%pU", c->set_uuid) || in register_cache_set()
2167 kobject_add(&c->internal, &c->kobj, "internal")) in register_cache_set()
2374 if (kobject_add(&ca->kobj, bdev_kobj(bdev), "bcache")) { in register_cache()
/linux-5.19.10/block/
Dblk-mq-sysfs.c193 ret = kobject_add(&hctx->kobj, q->mq_kobj, "%u", hctx->queue_num); in blk_mq_register_hctx()
198 ret = kobject_add(&ctx->kobj, &hctx->kobj, "cpu%u", ctx->cpu); in blk_mq_register_hctx()
264 ret = kobject_add(q->mq_kobj, kobject_get(&dev->kobj), "%s", "mq"); in __blk_mq_register_dev()
Delevator.c502 error = kobject_add(&e->kobj, &q->kobj, "%s", "iosched"); in elv_register_queue()
/linux-5.19.10/Documentation/core-api/
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-5.19.10/drivers/platform/x86/
Dthink-lmi.c1246 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-5.19.10/drivers/of/
Dkobj.c137 rc = kobject_add(&np->kobj, parent, "%s", name); in __of_attach_node_sysfs()
/linux-5.19.10/drivers/gpu/drm/i915/gt/
Dsysfs_engines.c436 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-5.19.10/include/linux/
Dkobject.h95 int kobject_add(struct kobject *kobj, struct kobject *parent,
/linux-5.19.10/drivers/firmware/efi/
Druntime-map.c128 ret = kobject_add(&entry->kobj, NULL, "%d", nr); in add_sysfs_runtime_map_entry()
/linux-5.19.10/lib/
Dkobject.c394 int kobject_add(struct kobject *kobj, struct kobject *parent, in kobject_add() function
415 EXPORT_SYMBOL(kobject_add);
782 retval = kobject_add(kobj, parent, "%s", name); in kobject_create_and_add()
/linux-5.19.10/arch/powerpc/kernel/
Dsecvar-sysfs.c195 rc = kobject_add(kobj, &secvar_kset->kobj, "%s", name); in secvar_sysfs_load()
/linux-5.19.10/arch/powerpc/platforms/pseries/
Dvas-sysfs.c213 ret = kobject_add(&centry->kobj, kobj, "%s", name); in sysfs_add_vas_caps()
/linux-5.19.10/kernel/livepatch/
Dcore.c742 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()
892 ret = kobject_add(&patch->kobj, klp_root_kobj, "%s", patch->mod->name); in klp_init_patch()
/linux-5.19.10/drivers/firmware/
Dmemmap.c191 if (kobject_add(&entry->kobj, NULL, "%d", map_entries_nr++)) in add_sysfs_fw_map_entry()
Dturris-mox-rwtm.c119 if (kobject_add(rwtm_to_kobj(rwtm), firmware_kobj, "turris-mox-rwtm")) { in mox_kobj_create()
/linux-5.19.10/arch/x86/kernel/cpu/mce/
Damd.c1151 err = kobject_add(&b->blocks->kobj, b->kobj, b->blocks->kobj.name); in __threshold_add_blocks()
1157 err = kobject_add(&pos->kobj, b->kobj, pos->kobj.name); in __threshold_add_blocks()
1187 err = kobject_add(b->kobj, &dev->kobj, name); in threshold_create_bank()
/linux-5.19.10/arch/powerpc/platforms/powernv/
Dopal-elog.c225 rc = kobject_add(&elog->kobj, NULL, "0x%llx", id); in create_elog_obj()
Dopal-dump.c351 rc = kobject_add(&dump->kobj, NULL, "0x%x-0x%x", type, id); in create_dump_obj()
/linux-5.19.10/crypto/
Dpcrypt.c312 ret = kobject_add(&pinst->kobj, NULL, "%s", name); in pcrypt_sysfs_add()
/linux-5.19.10/arch/arm64/kernel/
Dcpuinfo.c293 rc = kobject_add(&info->kobj, &dev->kobj, "regs"); in cpuid_cpu_online()
/linux-5.19.10/drivers/uio/
Duio.c316 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-5.19.10/sound/hda/
Dhdac_sysfs.c348 err = kobject_add(kobj, parent, "%02x", nid); in add_widget_node()
/linux-5.19.10/drivers/infiniband/core/
Dsysfs.c1166 ret = kobject_add(&gid_attr_group->kobj, &port->kobj, "gid_attrs"); in setup_gid_attrs()
1248 ret = kobject_add(&p->kobj, coredev->ports_kobj, "%d", port_num); in setup_port()

12