cdev_set_parent(9)

cdev_set_parent9

Set the parent kobject for a char device

Usage

void cdev_set_parent(struct cdev * p, struct kobject * kobj);

Arguments

p

the cdev structure

kobj

the kobject to take a reference to

Overview

cdev_set_parent sets a parent kobject which will be referenced appropriately so the parent is not freed before the cdev. This should be called before cdev_add.

From linux-manual-4.9 4.9.228-1 in Debian 9 (Stretch). Parsed by carta from the page's man source.