]> rtime.felk.cvut.cz Git - linux-imx.git/commitdiff
usb: gadget: uvc: clarify comment about string descriptors
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Fri, 1 Mar 2013 19:46:22 +0000 (20:46 +0100)
committerFelipe Balbi <balbi@ti.com>
Mon, 18 Mar 2013 09:18:17 +0000 (11:18 +0200)
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>
drivers/usb/gadget/f_uvc.c

index 92efd6ec48afde2333f2edf2a6000d70bbfbd098..dd372ce9f3e2c007b2a13938678414663caac189 100644 (file)
@@ -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)