Home
last modified time | relevance | path

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

12

/linux-6.3-rc2/Documentation/translations/zh_CN/core-api/
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-6.3-rc2/drivers/md/bcache/
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()
A Dsuper.c1464 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 Dblk-mq-sysfs.c169 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 Delevator.c470 error = kobject_add(&e->kobj, &q->disk->queue_kobj, "iosched"); in elv_register_queue()
/linux-6.3-rc2/Documentation/core-api/
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-6.3-rc2/drivers/platform/x86/
A 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-6.3-rc2/drivers/of/
A Dkobj.c137 rc = kobject_add(&np->kobj, parent, "%s", name); in __of_attach_node_sysfs()
/linux-6.3-rc2/arch/x86/platform/efi/
A Druntime-map.c128 ret = kobject_add(&entry->kobj, NULL, "%d", nr); in add_sysfs_runtime_map_entry()
/linux-6.3-rc2/include/linux/
A Dkobject.h95 int kobject_add(struct kobject *kobj, struct kobject *parent,
/linux-6.3-rc2/drivers/gpu/drm/i915/gt/
A Dsysfs_engines.c441 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 Dkobject.c402 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 Dvas-sysfs.c213 ret = kobject_add(&centry->kobj, kobj, "%s", name); in sysfs_add_vas_caps()
/linux-6.3-rc2/kernel/livepatch/
A Dcore.c782 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 Dsecvar-sysfs.c172 rc = kobject_add(kobj, &secvar_kset->kobj, "%s", name); in add_var()
/linux-6.3-rc2/drivers/firmware/
A Dmemmap.c191 if (kobject_add(&entry->kobj, NULL, "%d", map_entries_nr++)) in add_sysfs_fw_map_entry()
A Dturris-mox-rwtm.c119 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 Damd.c1152 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 Dopal-elog.c225 rc = kobject_add(&elog->kobj, NULL, "0x%llx", id); in create_elog_obj()
A Dopal-dump.c351 rc = kobject_add(&dump->kobj, NULL, "0x%x-0x%x", type, id); in create_dump_obj()
/linux-6.3-rc2/crypto/
A Dpcrypt.c312 ret = kobject_add(&pinst->kobj, NULL, "%s", name); in pcrypt_sysfs_add()
/linux-6.3-rc2/arch/arm64/kernel/
A Dcpuinfo.c330 rc = kobject_add(&info->kobj, &dev->kobj, "regs"); in cpuid_cpu_online()
/linux-6.3-rc2/drivers/uio/
A 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-6.3-rc2/sound/hda/
A Dhdac_sysfs.c348 err = kobject_add(kobj, parent, "%02x", nid); in add_widget_node()
/linux-6.3-rc2/drivers/infiniband/core/
A Dsysfs.c1166 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()

Completed in 44 milliseconds

12