]> git.karo-electronics.de Git - linux-beck.git/commitdiff
usb: gadget: Fix os desc test
authorMario Schuknecht <mario.schuknecht@dresearch-fe.de>
Mon, 26 Jan 2015 19:30:27 +0000 (20:30 +0100)
committerFelipe Balbi <balbi@ti.com>
Tue, 27 Jan 2015 15:34:58 +0000 (09:34 -0600)
USB vendor type is encoded in field bmRequestType. Make test USB_TYPE_VENDOR
with bRequestType instead of bRequest.

Signed-off-by: Mario Schuknecht <mario.schuknecht@dresearch-fe.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/composite.c

index 617835348569d63de1d41e5701bc8fc4bb742abd..13adfd1a3f54947f860f10161156a057dde274bc 100644 (file)
@@ -1655,7 +1655,7 @@ unknown:
                 * OS descriptors handling
                 */
                if (cdev->use_os_string && cdev->os_desc_config &&
-                   (ctrl->bRequest & USB_TYPE_VENDOR) &&
+                   (ctrl->bRequestType & USB_TYPE_VENDOR) &&
                    ctrl->bRequest == cdev->b_vendor_code) {
                        struct usb_request              *req;
                        struct usb_configuration        *os_desc_cfg;