函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:dev_device_add() - add a char device and it's corresponding* struct device, linkink*@dev: the device structure*@cdev: the cdev structure* cdev_device_add() adds the char device represented by @cdev to the system,* just as cdev_add does

函数原型:int cdev_device_add(struct cdev *cdev, struct device *dev)

返回类型:int

参数:

类型参数名称
struct cdev *cdev
struct device *dev
536  rc等于0
538  如果 dev_t, creates the sysfs "dev"
539  dev_set_parent() - set the parent kobject for a char device*@p: the cdev structure*@kobj: the kobject to take a reference to* cdev_set_parent() sets a parent kobject which will be referenced* appropriately so the parent is not freed before the cdev. This
541  rc等于dev_add() - add a char device to the system*@p: the cdev structure for the device*@dev: the first device number for which this device is responsible*@count: the number of consecutive minor numbers corresponding to this* device* cdev_add() adds the device
542  如果rc则返回:rc
546  rc等于device_add(dev)
547  如果rcdev_del() - remove a cdev from the system*@p: the cdev structure to be removed* cdev_del() removes @p from the system, possibly freeing the structure* itself
550  返回:rc
调用者
名称描述
posix_clock_register