usb: gadget: udc: atmel: remove unnecessary & operation
authorFelipe Balbi <felipe.balbi@linux.intel.com>
Wed, 28 Sep 2016 11:17:38 +0000 (14:17 +0300)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Thu, 3 Nov 2016 08:38:25 +0000 (10:38 +0200)
Now that usb_endpoint_maxp() only returns the lowest
11 bits from wMaxPacketSize, we can remove the &
operation from this driver.

Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: <linux-usb@vger.kernel.org>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/gadget/udc/atmel_usba_udc.c

index c57012b..125680d 100644 (file)
@@ -529,7 +529,7 @@ usba_ep_enable(struct usb_ep *_ep, const struct usb_endpoint_descriptor *desc)
 
        DBG(DBG_GADGET, "%s: ep_enable: desc=%p\n", ep->ep.name, desc);
 
-       maxpacket = usb_endpoint_maxp(desc) & 0x7ff;
+       maxpacket = usb_endpoint_maxp(desc);
 
        if (((desc->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK) != ep->index)
                        || ep->index == 0