Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:register_test_dev_kmod

Proto:static struct kmod_test_device *register_test_dev_kmod(void)

Type:struct kmod_test_device

Parameter:Nothing

1139  struct kmod_test_device * test_dev = NULL
1142  mutex_lock( & For device allocation / registration)
1145  If um_test_devs actually represents the *next* ID of the next* device we will allow to create. + 1 == INT_MAX Then
1146  pr_err("reached limit of number of test devices\n")
1147  Go to out
1150  test_dev = alloc_test_dev_kmod(um_test_devs actually represents the *next* ID of the next* device we will allow to create.)
1151  If Not test_dev Then Go to out
1154  ret = register a miscellaneous device
1155  If ret Then
1156  pr_err("could not register misc device: %d\n", ret)
1157  free_test_dev_kmod(test_dev)
1158  Go to out
1161  dev = this_device
1162  list_add_tail - add a new entry*@new: new entry to be added*@head: list head to add it before* Insert a new entry before the specified head.* This is useful for implementing queues.
1163  dev_info(dev, "interface ready\n")
1165  um_test_devs actually represents the *next* ID of the next* device we will allow to create.++
1167  out :
1168  mutex_unlock( & For device allocation / registration)
1170  Return test_dev
Caller
NameDescribe
test_kmod_init