Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:ksysfs_init

Proto:static int __init ksysfs_init(void)

Type:int

Parameter:Nothing

243  kernel_kobj = kobject_create_and_add() - Create a struct kobject dynamically and* register it with sysfs.*@name: the name for the kobject*@parent: the parent kobject of this kobject, if any.* This function creates a kobject structure dynamically and registers it
244  If Not kernel_kobj Then
245  error = -ENOMEM
246  Go to exit
248  error = sysfs_create_group(kernel_kobj, & kernel_attr_group)
249  If error Then Go to kset_exit
252  If notes_size > 0 Then
253  size = notes_size
254  error = sysfs_create_bin_file(kernel_kobj, & notes_attr)
255  If error Then Go to group_exit
259  Return 0
261  group_exit :
262  sysfs_remove_group(kernel_kobj, & kernel_attr_group)
263  kset_exit :
264  kobject_put() - Decrement refcount for object.*@kobj: object.* Decrement the refcount, and if 0, call kobject_cleanup().
265  exit :
266  Return error