USB: dbpg gadget: dont mask out direction bit
authorSven Schnelle <svens@stackframe.org>
Wed, 23 Mar 2011 14:24:56 +0000 (15:24 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 30 Apr 2011 00:24:30 +0000 (17:24 -0700)
Stripping the direction bit off will produce an
invalid descriptor.

Signed-off-by: Sven Schnelle <svens@stackframe.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/gadget/dbgp.c

index 795525c..dbe92ee 100644 (file)
@@ -261,8 +261,8 @@ static int __init dbgp_configure_endpoints(struct usb_gadget *gadget)
        o_desc.wMaxPacketSize =
                __constant_cpu_to_le16(USB_DEBUG_MAX_PACKET_SIZE);
 
-       dbg_desc.bDebugInEndpoint = i_desc.bEndpointAddress & 0x7f;
-       dbg_desc.bDebugOutEndpoint = o_desc.bEndpointAddress & 0x7f;
+       dbg_desc.bDebugInEndpoint = i_desc.bEndpointAddress;
+       dbg_desc.bDebugOutEndpoint = o_desc.bEndpointAddress;
 
 #ifdef CONFIG_USB_G_DBGP_SERIAL
        dbgp.serial->in = dbgp.i_ep;