Commit f0419d9f authored by Felipe Balbi's avatar Felipe Balbi
Browse files

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: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
Cc: <linux-usb@vger.kernel.org>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent 91f97521
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;