diff options
author | Jaejoong Kim <climbbb.kim@gmail.com> | 2017-10-20 16:29:14 +0900 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2017-10-20 11:19:32 +0300 |
commit | 7521d47960d6a7f3b5f9f26d4baf5f97e050d7ac (patch) | |
tree | 234db27b098ee535aab3fa380430a682c0e35448 | |
parent | 99bcb23851ffa19d8ad13cd35100990559aac82c (diff) |
usb: gadget: udc: gr: 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/gr_udc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/udc/gr_udc.c b/drivers/usb/gadget/udc/gr_udc.c index 1f9941145746..48117a539146 100644 --- a/drivers/usb/gadget/udc/gr_udc.c +++ b/drivers/usb/gadget/udc/gr_udc.c @@ -1538,7 +1538,7 @@ static int gr_ep_enable(struct usb_ep *_ep, * Bits 10-0 set the max payload. 12-11 set the number of * additional transactions. */ - max = 0x7ff & usb_endpoint_maxp(desc); + max = usb_endpoint_maxp(desc); nt = usb_endpoint_maxp_mult(desc) - 1; buffer_size = GR_BUFFER_SIZE(epctrl); if (nt && (mode == 0 || mode == 2)) { |