Commit ee8ac855 authored by Felipe Balbi's avatar Felipe Balbi

usb: gadget: udc: dummy: make use of new usb_endpoint_maxp_mult()

We have introduced a helper to calculate multiplier
value from wMaxPacketSize. Start using it.

Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: <linux-usb@vger.kernel.org>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent 1f5bba73
...@@ -1483,8 +1483,7 @@ static int periodic_bytes(struct dummy *dum, struct dummy_ep *ep) ...@@ -1483,8 +1483,7 @@ static int periodic_bytes(struct dummy *dum, struct dummy_ep *ep)
int tmp; int tmp;
/* high bandwidth mode */ /* high bandwidth mode */
tmp = usb_endpoint_maxp(ep->desc); tmp = usb_endpoint_maxp_mult(ep->desc);
tmp = (tmp >> 11) & 0x03;
tmp *= 8 /* applies to entire frame */; tmp *= 8 /* applies to entire frame */;
limit += limit * tmp; limit += limit * tmp;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment