The comment that describes string descriptors allocation isn't clear,
fix it.

Signed-off-by: Laurent Pinchart <laurent.pinch...@ideasonboard.com>
---
 drivers/usb/gadget/f_uvc.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/f_uvc.c b/drivers/usb/gadget/f_uvc.c
index 5b62987..2d08cc9 100644
--- a/drivers/usb/gadget/f_uvc.c
+++ b/drivers/usb/gadget/f_uvc.c
@@ -799,7 +799,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)
-- 
1.7.12.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to