1KOBJECT_INIT_AND_ADD(9)          Driver Basics         KOBJECT_INIT_AND_ADD(9)
2
3
4

NAME

6       kobject_init_and_add - initialize a kobject structure and add it to the
7       kobject hierarchy
8

SYNOPSIS

10       int kobject_init_and_add(struct kobject * kobj,
11                                struct kobj_type * ktype,
12                                struct kobject * parent, const char * fmt,
13                                ...);
14

ARGUMENTS

16       kobj
17           pointer to the kobject to initialize
18
19       ktype
20           pointer to the ktype for this kobject.
21
22       parent
23           pointer to the parent of this kobject.
24
25       fmt
26           the name of the kobject.
27
28       ...
29           variable arguments
30

DESCRIPTION

32       This function combines the call to kobject_init and kobject_add. The
33       same type of error handling after a call to kobject_add and kobject
34       lifetime rules are the same here.
35
37Kernel Hackers Manual 3.10         June 2019           KOBJECT_INIT_AND_ADD(9)
Impressum