'\" t .\" Title: devm_add_action .\" 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 "DEVM_ADD_ACTION" "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" devm_add_action \- add a custom action to list of managed resources .SH "SYNOPSIS" .HP \w'int\ devm_add_action('u .BI "int devm_add_action(struct\ device\ *\ " "dev" ", void\ (*" "action" ")\ (void\ *), void\ *\ " "data" ");" .SH "ARGUMENTS" .PP \fIdev\fR .RS 4 Device that owns the action .RE .PP \fIaction\fR .RS 4 Function that should be called .RE .PP \fIdata\fR .RS 4 Pointer to data passed to \fIaction\fR implementation .RE .SH "DESCRIPTION" .PP This adds a custom action to the list of managed resources so that it gets executed as part of standard resource unwinding\&. .SH "COPYRIGHT" .br