'\" t .\" Title: usb_string_id .\" Author: .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: June 2017 .\" Manual: Kernel Mode Gadget API .\" Source: Kernel Hackers Manual 4.11.3 .\" Language: English .\" .TH "USB_STRING_ID" "9" "June 2017" "Kernel Hackers Manual 4\&.11\&" "Kernel Mode Gadget API" .\" ----------------------------------------------------------------- .\" * 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_string_id \- allocate an unused string ID .SH "SYNOPSIS" .HP \w'int\ usb_string_id('u .BI "int usb_string_id(struct\ usb_composite_dev\ *\ " "cdev" ");" .SH "ARGUMENTS" .PP \fIstruct usb_composite_dev * cdev\fR .RS 4 the device whose string descriptor IDs are being allocated .RE .SH "CONTEXT" .PP single threaded during gadget setup .SH "DESCRIPTION" .PP \fIusb_string_id\fR() is called from \fBbind\fR callbacks to allocate string IDs\&. Drivers for functions, configurations, or gadgets will then store that ID in the appropriate descriptors and string table\&. .PP All string identifier should be allocated using this, \fIusb_string_ids_tab\fR() or \fIusb_string_ids_n\fR() routine, to ensure that for example different functions don\*(Aqt wrongly assign different meanings to the same identifier\&. .SH "AUTHOR" .PP \fBDavid Brownell\fR <\&dbrownell@users.sourceforge.net\&> .RS 4 Author. .RE .SH "COPYRIGHT" .br