'\" t .\" Title: usb_string_ids_tab .\" Author: .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: May 2018 .\" Manual: Kernel Mode Gadget API .\" Source: Kernel Hackers Manual 3.16.56 .\" Language: English .\" .TH "USB_STRING_IDS_TAB" "9" "May 2018" "Kernel Hackers Manual 3\&.16\&" "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_ids_tab \- allocate unused string IDs in batch .SH "SYNOPSIS" .HP \w'int\ usb_string_ids_tab('u .BI "int usb_string_ids_tab(struct\ usb_composite_dev\ *\ " "cdev" ", struct\ usb_string\ *\ " "str" ");" .SH "ARGUMENTS" .PP \fIcdev\fR .RS 4 the device whose string descriptor IDs are being allocated .RE .PP \fIstr\fR .RS 4 an array of usb_string objects to assign numbers to .RE .SH "CONTEXT" .PP single threaded during gadget setup .SH "DESCRIPTION" .PP @\fBusb_string_ids\fR is called from \fBbind\fR callbacks to allocate string IDs\&. Drivers for functions, configurations, or gadgets will then copy IDs from the string table to the appropriate descriptors and string table for other languages\&. .PP All string identifier should be allocated using this, @\fBusb_string_id\fR or @\fBusb_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