Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 316900
b: refs/heads/master
c: 3de6e63
h: refs/heads/master
v: v3
  • Loading branch information
Bhupesh Sharma authored and Felipe Balbi committed Jun 4, 2012
1 parent 609140a commit 0ae6f1a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0a00790ff4755f2e3eab907a43725cff59fc074b
refs/heads/master: 3de6e63f7845e99981e489ddccf70b3ec02fe00a
38 changes: 22 additions & 16 deletions trunk/drivers/usb/gadget/f_uvc.c
Original file line number Diff line number Diff line change
Expand Up @@ -619,22 +619,28 @@ uvc_bind_config(struct usb_configuration *c,
uvc->desc.fs_streaming = fs_streaming;
uvc->desc.hs_streaming = hs_streaming;

/* Allocate string descriptor numbers. */
if ((ret = usb_string_id(c->cdev)) < 0)
goto error;
uvc_en_us_strings[UVC_STRING_ASSOCIATION_IDX].id = ret;
uvc_iad.iFunction = ret;

if ((ret = usb_string_id(c->cdev)) < 0)
goto error;
uvc_en_us_strings[UVC_STRING_CONTROL_IDX].id = ret;
uvc_control_intf.iInterface = ret;

if ((ret = usb_string_id(c->cdev)) < 0)
goto error;
uvc_en_us_strings[UVC_STRING_STREAMING_IDX].id = ret;
uvc_streaming_intf_alt0.iInterface = ret;
uvc_streaming_intf_alt1.iInterface = ret;
/* maybe allocate device-global string IDs, and patch descriptors */
if (uvc_en_us_strings[UVC_STRING_ASSOCIATION_IDX].id == 0) {
/* Allocate string descriptor numbers. */
ret = usb_string_id(c->cdev);
if (ret < 0)
goto error;
uvc_en_us_strings[UVC_STRING_ASSOCIATION_IDX].id = ret;
uvc_iad.iFunction = ret;

ret = usb_string_id(c->cdev);
if (ret < 0)
goto error;
uvc_en_us_strings[UVC_STRING_CONTROL_IDX].id = ret;
uvc_control_intf.iInterface = ret;

ret = usb_string_id(c->cdev);
if (ret < 0)
goto error;
uvc_en_us_strings[UVC_STRING_STREAMING_IDX].id = ret;
uvc_streaming_intf_alt0.iInterface = ret;
uvc_streaming_intf_alt1.iInterface = ret;
}

/* Register the function. */
uvc->func.name = "uvc";
Expand Down

0 comments on commit 0ae6f1a

Please sign in to comment.