'\" t .\" Title: kobject_init_and_add .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: January 2017 .\" Manual: Driver Basics .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "KOBJECT_INIT_AND_ADD" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "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_and_add \- initialize a kobject structure and add it to the kobject hierarchy .SH "SYNOPSIS" .HP \w'int\ kobject_init_and_add('u .BI "int kobject_init_and_add(struct\ kobject\ *\ " "kobj" ", struct\ kobj_type\ *\ " "ktype" ", struct\ kobject\ *\ " "parent" ", const\ char\ *\ " "fmt" ", " "\&.\&.\&." ");" .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 .PP \fIparent\fR .RS 4 pointer to the parent of this kobject\&. .RE .PP \fIfmt\fR .RS 4 the name of the kobject\&. .RE .PP \fI\&.\&.\&.\fR .RS 4 variable arguments .RE .SH "DESCRIPTION" .PP This function combines the call to \fBkobject_init\fR and \fBkobject_add\fR\&. The same type of error handling after a call to \fBkobject_add\fR and kobject lifetime rules are the same here\&. .SH "COPYRIGHT" .br