usb: gadget: remove unnecessary AND operation when get ep maxp
usb_endpoint_maxp() already returns actual max packet size, no need to AND 0x7ff. Acked-by: Felipe Balbi <balbi@kernel.org> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Link: https://lore.kernel.org/r/1628836253-7432-7-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
b553c9466f
commit
97d99f7e8f
@ -492,7 +492,7 @@ extern char *usb_get_gadget_udc_name(void);
|
||||
*/
|
||||
static inline size_t usb_ep_align(struct usb_ep *ep, size_t len)
|
||||
{
|
||||
int max_packet_size = (size_t)usb_endpoint_maxp(ep->desc) & 0x7ff;
|
||||
int max_packet_size = (size_t)usb_endpoint_maxp(ep->desc);
|
||||
|
||||
return round_up(len, max_packet_size);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user