From: Felipe Balbi Date: Wed, 28 Sep 2016 10:28:44 +0000 (+0300) Subject: usb: gadget: udc: atmel: make use of new usb_endpoint_maxp_mult() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f0419d9fdf402b4ac07db974df9f3cd3f5de2cdd;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Cc: Signed-off-by: Felipe Balbi --- 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;