'\" t .\" Title: usb_string_ids_tab .\" Author: .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: Kernel Mode Gadget API .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "USB_STRING_IDS_TAB" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "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 \fIusb_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, \fIusb_string_id\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