Home
last modified time | relevance | path

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

12

/linux/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()来直接释
346 添加到一个kset中。答案是这个任务是由kobject_add()处理的。当一个
347 kobject被传递给kobject_add()时,它的kset成员应该指向这个kobject
348 所属的kset。 kobject_add()将处理剩下的部分。
/linux/drivers/md/bcache/
A Dstats.c96 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 Dsuper.c1469 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 Dblk-mq-sysfs.c195 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 Delevator.c497 error = kobject_add(&e->kobj, &q->kobj, "%s", "iosched"); in elv_register_queue()
/linux/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
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 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/lib/
A Dkobject.c426 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 Dlib.a3 …t�klist_prev�klist_next�kobject_get_path�kobject_set_name�kobject_init�kobject_add�kobject_init_an…
/linux/drivers/of/
A Dkobj.c137 rc = kobject_add(&np->kobj, parent, "%s", name); in __of_attach_node_sysfs()
/linux/drivers/firmware/efi/
A Druntime-map.c127 ret = kobject_add(&entry->kobj, NULL, "%d", nr); in add_sysfs_runtime_map_entry()
/linux/include/linux/
A Dkobject.h95 int kobject_add(struct kobject *kobj, struct kobject *parent,
/linux/drivers/platform/x86/
A Dthink-lmi.c798 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 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()
903 ret = kobject_add(&patch->kobj, klp_root_kobj, "%s", patch->mod->name); in klp_init_patch()
/linux/arch/powerpc/kernel/
A Dsecvar-sysfs.c192 rc = kobject_add(kobj, &secvar_kset->kobj, "%s", name); in secvar_sysfs_load()
/linux/drivers/firmware/
A Dmemmap.c190 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/arch/x86/kernel/cpu/mce/
A Damd.c1328 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 Dopal-elog.c224 rc = kobject_add(&elog->kobj, NULL, "0x%llx", id); in create_elog_obj()
A Dopal-dump.c350 rc = kobject_add(&dump->kobj, NULL, "0x%x-0x%x", type, id); in create_dump_obj()
/linux/crypto/
A Dpcrypt.c312 ret = kobject_add(&pinst->kobj, NULL, "%s", name); in pcrypt_sysfs_add()
/linux/arch/arm64/kernel/
A Dcpuinfo.c281 rc = kobject_add(&info->kobj, &dev->kobj, "regs"); in cpuid_cpu_online()
/linux/drivers/uio/
A Duio.c314 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 Dhdac_sysfs.c348 err = kobject_add(kobj, parent, "%02x", nid); in add_widget_node()
/linux/drivers/infiniband/core/
A Dsysfs.c1165 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()

Completed in 43 milliseconds

12