usb: gadget: udc: s3c2410: 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:27 +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.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/gadget/udc/s3c2410_udc.c

index eb3571ee59e3c4a454b87e2103a921ed88eea2f7..4643a01262b40db391624cd842669b50252d865a 100644 (file)
@@ -1047,10 +1047,10 @@ static int s3c2410_udc_ep_enable(struct usb_ep *_ep,
        if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN)
                return -ESHUTDOWN;
 
-       max = usb_endpoint_maxp(desc) & 0x1fff;
+       max = usb_endpoint_maxp(desc);
 
        local_irq_save(flags);
-       _ep->maxpacket = max & 0x7ff;
+       _ep->maxpacket = max;
        ep->ep.desc = desc;
        ep->halted = 0;
        ep->bEndpointAddress = desc->bEndpointAddress;