summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaejoong Kim <climbbb.kim@gmail.com>2017-10-20 09:29:13 +0200
committerFelipe Balbi <felipe.balbi@linux.intel.com>2017-10-20 10:19:24 +0200
commit99bcb23851ffa19d8ad13cd35100990559aac82c (patch)
tree75a96e4841ebb12c3e5e401d73ef78f0d30716aa
parentusb: dwc3: of-simple: Add support to get resets for the device (diff)
downloadlinux-99bcb23851ffa19d8ad13cd35100990559aac82c.tar.xz
linux-99bcb23851ffa19d8ad13cd35100990559aac82c.zip
usb: gadget: udc: remove duplicate & operation
usb_endpoint_maxp() has an inline keyword and searches for bits[10:0] by & operation with 0x7ff. So, we can remove the duplicate & operation with 0x7ff. Signed-off-by: Jaejoong Kim <climbbb.kim@gmail.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-rw-r--r--drivers/usb/gadget/udc/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/udc/core.c b/drivers/usb/gadget/udc/core.c
index d41d07aae0ce..54b02eca0456 100644
--- a/drivers/usb/gadget/udc/core.c
+++ b/drivers/usb/gadget/udc/core.c
@@ -912,7 +912,7 @@ int usb_gadget_ep_match_desc(struct usb_gadget *gadget,
return 0;
type = usb_endpoint_type(desc);
- max = 0x7ff & usb_endpoint_maxp(desc);
+ max = usb_endpoint_maxp(desc);
if (usb_endpoint_dir_in(desc) && !ep->caps.dir_in)
return 0;