---
name: "usb_string_id"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/usb_string_id"
---

# usb\_string\_id(9)

allocate an unused string ID

## NAME

usb\_string\_id - allocate an unused string ID

## SYNOPSIS

**int usb\_string\_id(struct usb\_composite\_dev \*** *cdev***);**

## ARGUMENTS

*cdev*

the device whose string descriptor IDs are being allocated

## CONTEXT

single threaded during gadget setup

## 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 don't wrongly assign different meanings to the same identifier.

## AUTHOR

**David Brownell** \<dbrownell@users.sourceforge.net\>

Author.

## COPYRIGHT
