From 96085cef9292ec235a02382ec515c936260b9f58 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E9=BB=84=E6=B6=9B?= Date: Sat, 30 Jul 2011 22:48:45 +0800 Subject: [PATCH] Revert "USB: composite: Fix USB WHQL Certification Issues" This reverts commit 7558ae6cd0d401b863f8f8d63fee12348270d045. --- drivers/usb/gadget/composite.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index 7e2dacc7974d..9c333f1cc62a 100755 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c @@ -765,11 +765,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 @@ -819,9 +819,6 @@ unknown: */ if ((ctrl->bRequestType & USB_RECIP_MASK) == USB_RECIP_INTERFACE) { - if (cdev->config == NULL) - return value; - f = cdev->config->interface[intf]; if (f && f->setup) value = f->setup(f, ctrl); -- 2.34.1