提交 7521d479 编写于 作者: J Jaejoong Kim 提交者: Felipe Balbi

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: NJaejoong Kim <climbbb.kim@gmail.com>
Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
上级 99bcb238
......@@ -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)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册