'\" t .\" Title: devres_destroy .\" 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 "DEVRES_DESTROY" "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" devres_destroy \- Find a device resource and destroy it .SH "SYNOPSIS" .HP \w'int\ devres_destroy('u .BI "int devres_destroy(struct\ device\ *\ " "dev" ", dr_release_t\ " "release" ", dr_match_t\ " "match" ", void\ *\ " "match_data" ");" .SH "ARGUMENTS" .PP \fIdev\fR .RS 4 Device to find resource from .RE .PP \fIrelease\fR .RS 4 Look for resources associated with this release function .RE .PP \fImatch\fR .RS 4 Match function (optional) .RE .PP \fImatch_data\fR .RS 4 Data for the match function .RE .SH "DESCRIPTION" .PP Find the latest devres of \fIdev\fR associated with \fIrelease\fR and for which \fImatch\fR returns 1\&. If \fImatch\fR is NULL, it\*(Aqs considered to match all\&. If found, the resource is removed atomically and freed\&. .PP Note that the release function for the resource will not be called, only the devres\-allocated data will be freed\&. The caller becomes responsible for freeing any other data\&. .SH "RETURNS" .PP 0 if devres is found and freed, \-ENOENT if not found\&. .SH "COPYRIGHT" .br