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

Cc: Nicolas Ferre <[email protected]>
Cc: <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
---
 drivers/usb/gadget/udc/atmel_usba_udc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/udc/atmel_usba_udc.c 
b/drivers/usb/gadget/udc/atmel_usba_udc.c
index 45bc997d0711..c57012b1ddf4 100644
--- a/drivers/usb/gadget/udc/atmel_usba_udc.c
+++ b/drivers/usb/gadget/udc/atmel_usba_udc.c
@@ -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;
 
-- 
2.10.0.440.g21f862b

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to