Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 364727
b: refs/heads/master
c: 43ff05e
h: refs/heads/master
i:
  364725: 2bba0dc
  364723: 4852371
  364719: d6525ab
v: v3
  • Loading branch information
Bhupesh Sharma authored and Felipe Balbi committed Mar 18, 2013
1 parent 6529825 commit 83456de
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 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: 609a0532a4d713819092a9311ffe89faa6bac617
refs/heads/master: 43ff05e20c6e2428fe2deb1dc0fed008743e66a3
14 changes: 6 additions & 8 deletions trunk/drivers/usb/gadget/f_uvc.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,11 @@ MODULE_PARM_DESC(streaming_maxburst, "0 - 15 (ss only)");

/* string IDs are assigned dynamically */

#define UVC_STRING_ASSOCIATION_IDX 0
#define UVC_STRING_CONTROL_IDX 1
#define UVC_STRING_STREAMING_IDX 2
#define UVC_STRING_CONTROL_IDX 0
#define UVC_STRING_STREAMING_IDX 1

static struct usb_string uvc_en_us_strings[] = {
[UVC_STRING_ASSOCIATION_IDX].s = "UVC Camera",
[UVC_STRING_CONTROL_IDX].s = "Video Control",
[UVC_STRING_CONTROL_IDX].s = "UVC Camera",
[UVC_STRING_STREAMING_IDX].s = "Video Streaming",
{ }
};
Expand Down Expand Up @@ -572,7 +570,7 @@ uvc_function_unbind(struct usb_configuration *c, struct usb_function *f)
uvc->control_ep->driver_data = NULL;
uvc->video.ep->driver_data = NULL;

uvc_en_us_strings[UVC_STRING_ASSOCIATION_IDX].id = 0;
uvc_en_us_strings[UVC_STRING_CONTROL_IDX].id = 0;
usb_ep_free_request(cdev->gadget->ep0, uvc->control_req);
kfree(uvc->control_buf);

Expand Down Expand Up @@ -796,12 +794,12 @@ uvc_bind_config(struct usb_configuration *c,
* 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) {
if (uvc_en_us_strings[UVC_STRING_CONTROL_IDX].id == 0) {
ret = usb_string_ids_tab(c->cdev, uvc_en_us_strings);
if (ret)
goto error;
uvc_iad.iFunction =
uvc_en_us_strings[UVC_STRING_ASSOCIATION_IDX].id;
uvc_en_us_strings[UVC_STRING_CONTROL_IDX].id;
uvc_control_intf.iInterface =
uvc_en_us_strings[UVC_STRING_CONTROL_IDX].id;
ret = uvc_en_us_strings[UVC_STRING_STREAMING_IDX].id;
Expand Down

0 comments on commit 83456de

Please sign in to comment.