Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\char_dev.c Create Date:2022-07-28 20:02:45
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__unregister_chrdev_region

Proto:static struct char_device_struct *__unregister_chrdev_region(unsigned major, unsigned baseminor, int minorct)

Type:struct char_device_struct

Parameter:

TypeParameterName
unsignedmajor
unsignedbaseminor
intminorct
174  cd = NULL
175  i = dex in the above
177  mutex_lock( & chrdevs_lock)
178  When cp cycle If major == major && baseminor == baseminor && minorct == minorct Then
182  Break
183  If cp Then
184  cd = cp
185  cp = next
187  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
188  Return cd
Caller
NameDescribe
register_chrdev_regiongister_chrdev_region() - register a range of device numbers*@from: the first in the desired range of device numbers; must include* the major number.*@count: the number of consecutive device numbers required*@name: the name of the device or driver.
__register_chrdev__register_chrdev() - create and register a cdev occupying a range of minors*@major: major device number or 0 for dynamic allocation*@baseminor: first of the requested range of minor numbers*@count: the number of minor numbers required*@name: name of this
unregister_chrdev_regionregister_chrdev_region() - unregister a range of device numbers*@from: the first in the range of numbers to unregister*@count: the number of device numbers to unregister* This function will unregister a range of @count device numbers,* starting with @from
__unregister_chrdev__unregister_chrdev - unregister and destroy a cdev*@major: major device number*@baseminor: first of the range of minor numbers*@count: the number of minor numbers this cdev is occupying*@name: name of this range of devices* Unregister and destroy the