usb_string_ids_n - allocate unused string IDs in batch
2. SYNOPSIS ▲
int usb_string_ids_n(struct usb_composite_dev * c , unsigned n );
3. ARGUMENTS ▲
the device whose string descriptor IDs are being allocated
number of string IDs to allocate
4. CONTEXT ▲
single threaded during gadget setup
5. DESCRIPTION ▲
Returns the first requested ID. This ID and next n-1 IDs are now valid IDs. At least provided that n is non-zero because if it is, returns last requested ID which is now very useful information.
usb_string_ids_n() is called from bind callbacks to allocate string IDs. Drivers for functions, configurations, or gadgets will then store that ID in the appropriate descriptors and string table.
All string identifier should be allocated using this, usb_string_id() or usb_string_ids_n() routine, to ensure that for example different functions donAqt wrongly assign different meanings to the same identifier.
6. AUTHOR ▲
David Brownell <
7. COPYRIGHT ▲