mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-01-24 19:44:55 +00:00
usb: gadget: udc: atmel: make use of new usb_endpoint_maxp_mult()
We have introduced a helper to calculate multiplier value from wMaxPacketSize. Start using it. Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: <linux-usb@vger.kernel.org> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
This commit is contained in:
parent
91f97521bb
commit
f0419d9fdf
@ -573,7 +573,7 @@ usba_ep_enable(struct usb_ep *_ep, const struct usb_endpoint_descriptor *desc)
|
||||
* Bits 11:12 specify number of _additional_
|
||||
* transactions per microframe.
|
||||
*/
|
||||
nr_trans = ((usb_endpoint_maxp(desc) >> 11) & 3) + 1;
|
||||
nr_trans = usb_endpoint_maxp_mult(desc);
|
||||
if (nr_trans > 3)
|
||||
return -EINVAL;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user