1. NAME

usb_string_id - allocate an unused string ID

2. SYNOPSIS

int usb_string_id(struct usb_composite_dev *  cdev );

3. ARGUMENTS

cdev
    the device whose string descriptor IDs are being allocated

4. CONTEXT

single threaded during gadget setup

5. DESCRIPTION

usb_string_id() 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_ids_tab() 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 <>
    Author.

7. COPYRIGHT