'\" t .\" Title: devm_request_resource .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: Hardware Interfaces .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "DEVM_REQUEST_RESOURC" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "Hardware Interfaces" .\" ----------------------------------------------------------------- .\" * 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" devm_request_resource \- request and reserve an I/O or memory resource .SH "SYNOPSIS" .HP \w'int\ devm_request_resource('u .BI "int devm_request_resource(struct\ device\ *\ " "dev" ", struct\ resource\ *\ " "root" ", struct\ resource\ *\ " "new" ");" .SH "ARGUMENTS" .PP \fIdev\fR .RS 4 device for which to request the resource .RE .PP \fIroot\fR .RS 4 root of the resource tree from which to request the resource .RE .PP \fInew\fR .RS 4 descriptor of the resource to request .RE .SH "DESCRIPTION" .PP This is a device\-managed version of \fBrequest_resource\fR\&. There is usually no need to release resources requested by this function explicitly since that will be taken care of when the device is unbound from its driver\&. If for some reason the resource needs to be released explicitly, because of ordering issues for example, drivers must call \fBdevm_release_resource\fR rather than the regular \fBrelease_resource\fR\&. .PP When a conflict is detected between any existing resources and the newly requested resource, an error message will be printed\&. .PP Returns 0 on success or a negative error code on failure\&. .SH "COPYRIGHT" .br