summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/f_uvc.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2013-03-01 20:46:22 +0100
committerFelipe Balbi <balbi@ti.com>2013-03-18 10:18:17 +0100
commitf9e612002fc50b3ae7cd1349eb2387e5430b44d9 (patch)
treeb14656d2cdd5705208b184f60d24bdf0b7f9cd60 /drivers/usb/gadget/f_uvc.c
parentusb: dwc3: exynos: use clk_prepare_enable and clk_disable_unprepare (diff)
downloadlinux-f9e612002fc50b3ae7cd1349eb2387e5430b44d9.tar.xz
linux-f9e612002fc50b3ae7cd1349eb2387e5430b44d9.zip
usb: gadget: uvc: clarify comment about string descriptors
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>
Diffstat (limited to 'drivers/usb/gadget/f_uvc.c')
-rw-r--r--drivers/usb/gadget/f_uvc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/usb/gadget/f_uvc.c b/drivers/usb/gadget/f_uvc.c
index 92efd6ec48af..dd372ce9f3e2 100644
--- a/drivers/usb/gadget/f_uvc.c
+++ b/drivers/usb/gadget/f_uvc.c
@@ -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)