Skip to content

Commit

Permalink
usb: gadget: uvc: clarify comment about string descriptors
Browse files Browse the repository at this point in the history
The comment that describes string descriptors allocation isn't clear,
fix it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Bhupesh Sharma <bhupesh.sharma@st.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Laurent Pinchart authored and Felipe Balbi committed Mar 18, 2013
1 parent ddb5147 commit f9e6120
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/usb/gadget/f_uvc.c
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,10 @@ uvc_bind_config(struct usb_configuration *c,
uvc->desc.hs_streaming = hs_streaming;
uvc->desc.ss_streaming = ss_streaming;

/* Allocate string descriptor numbers. */
/* String descriptors are global, we only need to allocate string IDs
* for the first UVC function. UVC functions beyond the first (if any)
* will reuse the same IDs.
*/
if (uvc_en_us_strings[UVC_STRING_ASSOCIATION_IDX].id == 0) {
ret = usb_string_ids_tab(c->cdev, uvc_en_us_strings);
if (ret)
Expand Down

0 comments on commit f9e6120

Please sign in to comment.