summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget
diff options
context:
space:
mode:
authorFelipe Balbi <felipe.balbi@linux.intel.com>2016-09-28 14:17:38 +0300
committerFelipe Balbi <felipe.balbi@linux.intel.com>2016-11-03 10:38:26 +0200
commit8c683c43fb8fe6549ca8a6527c2b742351d1e6ac (patch)
tree38a3ca0d1cb564bee826da73ee7124a7c2e64b7c /drivers/usb/gadget
parentc2b4d863e1dcb7f5b71926a45ee20de2f2c26cb2 (diff)
downloadlinux-8c683c43fb8fe6549ca8a6527c2b742351d1e6ac.tar.bz2
usb: gadget: udc: net2272: remove unnecessary & operation
Now that usb_endpoint_maxp() only returns the lowest 11 bits from wMaxPacketSize, we can remove the & operation from this driver. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r--drivers/usb/gadget/udc/net2272.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/gadget/udc/net2272.c b/drivers/usb/gadget/udc/net2272.c
index 7c6113432093..078c91d546e0 100644
--- a/drivers/usb/gadget/udc/net2272.c
+++ b/drivers/usb/gadget/udc/net2272.c
@@ -202,10 +202,10 @@ net2272_enable(struct usb_ep *_ep, const struct usb_endpoint_descriptor *desc)
if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN)
return -ESHUTDOWN;
- max = usb_endpoint_maxp(desc) & 0x1fff;
+ max = usb_endpoint_maxp(desc);
spin_lock_irqsave(&dev->lock, flags);
- _ep->maxpacket = max & 0x7fff;
+ _ep->maxpacket = max;
ep->desc = desc;
/* net2272_ep_reset() has already been called */