'\" t .\" Title: devres_add .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: Driver Basics .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "DEVRES_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" devres_add \- Register device resource .SH "SYNOPSIS" .HP \w'void\ devres_add('u .BI "void devres_add(struct\ device\ *\ " "dev" ", void\ *\ " "res" ");" .SH "ARGUMENTS" .PP \fIdev\fR .RS 4 Device to add resource to .RE .PP \fIres\fR .RS 4 Resource to register .RE .SH "DESCRIPTION" .PP Register devres \fIres\fR to \fIdev\fR\&. \fIres\fR should have been allocated using \fBdevres_alloc\fR\&. On driver detach, the associated release function will be invoked and devres will be freed automatically\&. .SH "COPYRIGHT" .br