'\" t .\" Title: usb_autopm_get_interface .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: January 2017 .\" Manual: USB Core APIs .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "USB_AUTOPM_GET_INTER" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "USB Core APIs" .\" ----------------------------------------------------------------- .\" * 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" usb_autopm_get_interface \- increment a USB interface\*(Aqs PM\-usage counter .SH "SYNOPSIS" .HP \w'int\ usb_autopm_get_interface('u .BI "int usb_autopm_get_interface(struct\ usb_interface\ *\ " "intf" ");" .SH "ARGUMENTS" .PP \fIintf\fR .RS 4 the usb_interface whose counter should be incremented .RE .SH "DESCRIPTION" .PP This routine should be called by an interface driver when it wants to use \fIintf\fR and needs to guarantee that it is not suspended\&. In addition, the routine prevents \fIintf\fR from being autosuspended subsequently\&. (Note that this will not prevent suspend events originating in the PM core\&.) This prevention will persist until \fBusb_autopm_put_interface\fR is called or \fIintf\fR is unbound\&. A typical example would be a character\-device driver when its device file is opened\&. .PP \fIintf\fR\*(Aqs usage counter is incremented to prevent subsequent autosuspends\&. However if the autoresume fails then the counter is re\-decremented\&. .PP This routine can run only in process context\&. .SH "RETURN" .PP 0 on success\&. .SH "COPYRIGHT" .br