函数逻辑报告

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_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

函数原型:void cdev_set_parent(struct cdev *p, struct kobject *kobj)

返回类型:void

参数:

类型参数名称
struct cdev *p
struct kobject *kobj
507  WARN_ON(!state_initialized)
508  父设备指针等于kobj
调用者
名称描述
cdev_device_adddev_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