projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7d52503
)
usb: gadget: composite: USB_GET_CONFIGURATION must return 0 in unconfigured state.
author
Oleg Matcovschi
<olegmatcovsky@gmail.com>
Fri, 11 Mar 2011 18:24:30 +0000
(10:24 -0800)
committer
Colin Cross
<ccross@android.com>
Tue, 14 Jun 2011 16:09:52 +0000
(09:09 -0700)
Change-Id: I5212ca9990308d0c4ae6a55c60cba42d6b0e4fee
Signed-off-by: Oleg Matcovschi <olegmatcovsky@gmail.com>
drivers/usb/gadget/composite.c
patch
|
blob
|
history
diff --git
a/drivers/usb/gadget/composite.c
b/drivers/usb/gadget/composite.c
index 42a948e49323e049ec247ea8df05d3bde2abfa22..c9ae8bba6962d1bd5eb6f0edd7733c8aaca27145 100644
(file)
--- a/
drivers/usb/gadget/composite.c
+++ b/
drivers/usb/gadget/composite.c
@@
-1013,12
+1013,11
@@
composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
case USB_REQ_GET_CONFIGURATION:
if (ctrl->bRequestType != USB_DIR_IN)
goto unknown;
- if (cdev->config)
{
+ if (cdev->config)
*(u8 *)req->buf = cdev->config->bConfigurationValue;
- value = min(w_length, (u16) 1);
- } else {
+ else
*(u8 *)req->buf = 0;
- }
+ value = min(w_length, (u16) 1);
break;
/* function drivers must handle get/set altsetting; if there's