Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\kobject.c Create Date:2022-07-28 06:16:16
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:kset_create() - Create a struct kset dynamically

Proto:static struct kset *kset_create(const char *name, const struct kset_uevent_ops *uevent_ops, struct kobject *parent_kobj)

Type:struct kset

Parameter:

TypeParameterName
const char *name
const struct kset_uevent_ops *uevent_ops
struct kobject *parent_kobj
955  kset = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
956  If Not kset Then Return NULL
958  retval = kobject_set_name() - Set the name of a kobject
959  If retval Then
960  kfree(kset)
961  Return NULL
963  uevent_ops = uevent_ops
964  parent = parent_kobj
971  ktype = kset_ktype
972  kset = NULL
974  Return kset
Caller
NameDescribe
kset_create_and_addkset_create_and_add() - Create a struct kset dynamically and add it to sysfs