'\" t .\" Title: __root_device_register .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: Device drivers infrastructure .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "__ROOT_DEVICE_REGIST" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "Device drivers infrastructure" .\" ----------------------------------------------------------------- .\" * 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" __root_device_register \- allocate and register a root device .SH "SYNOPSIS" .HP \w'struct\ device\ *\ __root_device_register('u .BI "struct device * __root_device_register(const\ char\ *\ " "name" ", struct\ module\ *\ " "owner" ");" .SH "ARGUMENTS" .PP \fIname\fR .RS 4 root device name .RE .PP \fIowner\fR .RS 4 owner module of the root device, usually THIS_MODULE .RE .SH "DESCRIPTION" .PP This function allocates a root device and registers it using \fBdevice_register\fR\&. In order to free the returned device, use \fBroot_device_unregister\fR\&. .PP Root devices are dummy devices which allow other devices to be grouped under /sys/devices\&. Use this function to allocate a root device and then use it as the parent of any device which should appear under /sys/devices/{name} .PP The /sys/devices/{name} directory will also contain a \*(Aqmodule\*(Aq symlink which points to the \fIowner\fR directory in sysfs\&. .PP Returns struct device pointer on success, or \fBERR_PTR\fR on error\&. .SH "NOTE" .PP You probably want to use \fBroot_device_register\fR\&. .SH "COPYRIGHT" .br