函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:gister_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.

函数原型:int register_chrdev_region(dev_t from, unsigned count, const char *name)

返回类型:int

参数:

类型参数名称
dev_tfrom
unsignedcount
const char *name
203  to等于fromcount
206 n小于to循环
207  next等于MKDEV(MAJOR(n) + 1, 0)
208  如果next大于tonext等于to
210  cd等于Register a single major with a specified minor range.* If major == 0 this function will dynamically allocate an unused major.* If major > 0 this function will attempt to reserve the range of minors* with given major.
212  如果是错误则转到:fail
215  返回:0
216  fail :
217  to等于n
218 n小于to循环
219  next等于MKDEV(MAJOR(n) + 1, 0)
220  释放内存
222  返回:错误