'\" t .\" Title: usb_altnum_to_altsetting .\" 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_ALTNUM_TO_ALTSET" "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_altnum_to_altsetting \- get the altsetting structure with a given alternate setting number\&. .SH "SYNOPSIS" .HP \w'struct\ usb_host_interface\ *\ usb_altnum_to_altsetting('u .BI "struct usb_host_interface * usb_altnum_to_altsetting(const\ struct\ usb_interface\ *\ " "intf" ", unsigned\ int\ " "altnum" ");" .SH "ARGUMENTS" .PP \fIintf\fR .RS 4 the interface containing the altsetting in question .RE .PP \fIaltnum\fR .RS 4 the desired alternate setting number .RE .SH "DESCRIPTION" .PP This searches the altsetting array of the specified interface for an entry with the correct bAlternateSetting value\&. .PP Note that altsettings need not be stored sequentially by number, so it would be incorrect to assume that the first altsetting entry in the array corresponds to altsetting zero\&. This routine helps device drivers avoid such mistakes\&. .PP Don\*(Aqt call this function unless you are bound to the intf interface or you have locked the device! .SH "RETURN" .PP A pointer to the entry of the altsetting array of \fIintf\fR that has \fIaltnum\fR as the alternate setting number\&. \fBNULL\fR if not found\&. .SH "COPYRIGHT" .br