1KOBJECT_INIT(9) Driver Basics KOBJECT_INIT(9)
2
3
4
6 kobject_init - initialize a kobject structure
7
9 void kobject_init(struct kobject * kobj, struct kobj_type * ktype);
10
12 kobj
13 pointer to the kobject to initialize
14
15 ktype
16 pointer to the ktype for this kobject.
17
19 This function will properly initialize a kobject such that it can then
20 be passed to the kobject_add call.
21
22 After this function is called, the kobject MUST be cleaned up by a call
23 to kobject_put, not by a call to kfree directly to ensure that all of
24 the memory is cleaned up properly.
25
27Kernel Hackers Manual 3.10 June 2019 KOBJECT_INIT(9)