]> git.karo-electronics.de Git - linux-beck.git/commitdiff
usb: gadget: udc: fsl: make use of new usb_endpoint_maxp_mult()
authorFelipe Balbi <felipe.balbi@linux.intel.com>
Wed, 28 Sep 2016 10:33:23 +0000 (13:33 +0300)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Thu, 3 Nov 2016 08:38:19 +0000 (10:38 +0200)
We have introduced a helper to calculate multiplier
value from wMaxPacketSize. Start using it.

Cc: Li Yang <leoli@freescale.com>
Cc: <linuxppc-dev@lists.ozlabs.org>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/gadget/udc/fsl_udc_core.c

index aab5221d6c2e35050edccaaa170f960f90c40887..4459644b9b5537c137e87aa7b3c0964a88dc2ff4 100644 (file)
@@ -585,7 +585,7 @@ static int fsl_ep_enable(struct usb_ep *_ep,
                break;
        case USB_ENDPOINT_XFER_ISOC:
                /* Calculate transactions needed for high bandwidth iso */
-               mult = (unsigned char)(1 + ((max >> 11) & 0x03));
+               mult = usb_endpoint_maxp_mult(desc);
                max = max & 0x7ff;      /* bit 0~10 */
                /* 3 transactions at most */
                if (mult > 3)