1CDEV_SET_PARENT(9) Char devices CDEV_SET_PARENT(9)
23
4
NAME
6cdev_set_parent - set the parent kobject for a char device
7
SYNOPSIS
9void cdev_set_parent(struct cdev * p, struct kobject * kobj);
10
ARGUMENTS
12p
13the cdev structure
1415
kobj
16the kobject to take a reference to
17
DESCRIPTION
19cdev_set_parent sets a parent kobject which will be referenced
20appropriately so the parent is not freed before the cdev. This should
21be called before cdev_add.
22
COPYRIGHT
24Kernel Hackers Manual 3.10 June 2019 CDEV_SET_PARENT(9)