]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
USB: gadget: Make g_hid device class conform to spec.
authorOrjan Friberg <of@flatfrog.com>
Wed, 7 Mar 2012 16:16:14 +0000 (17:16 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 2 Apr 2012 16:52:30 +0000 (09:52 -0700)
commit 33d2832ab0149a26418d360af3c444969a63fb28 upstream.

HID devices should specify this in their interface descriptors, not in the
device descriptor. This fixes a "missing hardware id" bug under Windows 7 with
a VIA VL800 (3.0) controller.

Signed-off-by: Orjan Friberg <of@flatfrog.com>
Cc: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/hid.c

index f888c3ede86087ae0cab6127b86c6ac905ec2b7d..3493adf064f512bccc28358a202015188ff932e9 100644 (file)
@@ -60,9 +60,9 @@ static struct usb_device_descriptor device_desc = {
        /* .bDeviceClass =              USB_CLASS_COMM, */
        /* .bDeviceSubClass =   0, */
        /* .bDeviceProtocol =   0, */
-       .bDeviceClass =         0xEF,
-       .bDeviceSubClass =      2,
-       .bDeviceProtocol =      1,
+       .bDeviceClass =         USB_CLASS_PER_INTERFACE,
+       .bDeviceSubClass =      0,
+       .bDeviceProtocol =      0,
        /* .bMaxPacketSize0 = f(hardware) */
 
        /* Vendor and product id can be overridden by module parameters.  */