函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\char_dev.c Create Date:2022-07-29 10:32:39
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:__unregister_chrdev_region

函数原型:static struct char_device_struct *__unregister_chrdev_region(unsigned major, unsigned baseminor, int minorct)

返回类型:struct char_device_struct

参数:

类型参数名称
unsignedmajor
unsignedbaseminor
intminorct
174  cd等于NULL
175  i等于dex in the above
177  mutex_lock( & chrdevs_lock)
178 cp循环如果major恒等于majorbaseminor恒等于baseminorminorct恒等于minorct
182  退出
183  如果cp
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  返回:cd
调用者
名称描述
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