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:alloc_chrdev_region() - register a range of char device numbers*@dev: output parameter for first assigned number*@baseminor: first of the requested range of minor numbers*@count: the number of minor numbers required*@name: the name of the associated

Proto:int alloc_chrdev_region(dev_t *dev, unsigned baseminor, unsigned count, const char *name)

Type:int

Parameter:

TypeParameterName
dev_t *dev
unsignedbaseminor
unsignedcount
const char *name
240  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.
241  If IS_ERR(cd) Then Return PTR_ERR(cd)
243  dev = MKDEV(major, baseminor)
244  Return 0