diff options
author | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-09-28 13:33:23 +0300 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-11-03 10:38:19 +0200 |
commit | 4250914d3a298aea7a6e940180d225b64e95a6e3 (patch) | |
tree | c5739687d21653689b072941943c14cd540db764 /drivers/usb/gadget/udc/fsl_udc_core.c | |
parent | ee8ac85596ec0b45c7dd49e2a2a0af50f98542cd (diff) | |
download | op-kernel-dev-4250914d3a298aea7a6e940180d225b64e95a6e3.zip op-kernel-dev-4250914d3a298aea7a6e940180d225b64e95a6e3.tar.gz |
usb: gadget: udc: fsl: make use of new usb_endpoint_maxp_mult()
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>
Diffstat (limited to 'drivers/usb/gadget/udc/fsl_udc_core.c')
-rw-r--r-- | drivers/usb/gadget/udc/fsl_udc_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/udc/fsl_udc_core.c b/drivers/usb/gadget/udc/fsl_udc_core.c index aab5221..4459644 100644 --- a/drivers/usb/gadget/udc/fsl_udc_core.c +++ b/drivers/usb/gadget/udc/fsl_udc_core.c @@ -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) |