'\" t .\" Title: kobject_init .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: May 2018 .\" Manual: Driver Basics .\" Source: Kernel Hackers Manual 3.16.56 .\" Language: English .\" .TH "KOBJECT_INIT" "9" "May 2018" "Kernel Hackers Manual 3\&.16\&" "Driver Basics" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" kobject_init \- initialize a kobject structure .SH "SYNOPSIS" .HP \w'void\ kobject_init('u .BI "void kobject_init(struct\ kobject\ *\ " "kobj" ", struct\ kobj_type\ *\ " "ktype" ");" .SH "ARGUMENTS" .PP \fIkobj\fR .RS 4 pointer to the kobject to initialize .RE .PP \fIktype\fR .RS 4 pointer to the ktype for this kobject\&. .RE .SH "DESCRIPTION" .PP This function will properly initialize a kobject such that it can then be passed to the \fBkobject_add\fR call\&. .PP After this function is called, the kobject MUST be cleaned up by a call to \fBkobject_put\fR, not by a call to kfree directly to ensure that all of the memory is cleaned up properly\&. .SH "COPYRIGHT" .br