'\" t .\" Title: usb_ifnum_to_if .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: USB Core APIs .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "USB_IFNUM_TO_IF" "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_ifnum_to_if \- get the interface object with a given interface number .SH "SYNOPSIS" .HP \w'struct\ usb_interface\ *\ usb_ifnum_to_if('u .BI "struct usb_interface * usb_ifnum_to_if(const\ struct\ usb_device\ *\ " "dev" ", unsigned\ " "ifnum" ");" .SH "ARGUMENTS" .PP \fIdev\fR .RS 4 the device whose current configuration is considered .RE .PP \fIifnum\fR .RS 4 the desired interface .RE .SH "DESCRIPTION" .PP This walks the device descriptor for the currently active configuration to find the interface object with the particular interface number\&. .PP Note that configuration descriptors are not required to assign interface numbers sequentially, so that it would be incorrect to assume that the first interface in that descriptor corresponds to interface zero\&. This routine helps device drivers avoid such mistakes\&. However, you should make sure that you do the right thing with any alternate settings available for this interfaces\&. .PP Don\*(Aqt call this function unless you are bound to one of the interfaces on this device or you have locked the device! .SH "RETURN" .PP A pointer to the interface that has \fIifnum\fR as interface number, if found\&. \fBNULL\fR otherwise\&. .SH "COPYRIGHT" .br