diff options
author | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-09-28 13:36:58 +0300 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-11-03 10:38:19 +0200 |
commit | a0fefbde4680b64582ebb2ca1a3c175e6871f905 (patch) | |
tree | b3c61a8426c1ec1d111e8ed9a6750b52f18a8d58 | |
parent | 2f237451a815775d8616fe5dca9272839357a86b (diff) | |
download | op-kernel-dev-a0fefbde4680b64582ebb2ca1a3c175e6871f905.zip op-kernel-dev-a0fefbde4680b64582ebb2ca1a3c175e6871f905.tar.gz |
usb: gadget: udc: gr: make use of new usb_endpoint_maxp_mult()
We have introduced a helper to calculate multiplier
value from wMaxPacketSize. Start using it.
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-rw-r--r-- | drivers/usb/gadget/udc/gr_udc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/udc/gr_udc.c b/drivers/usb/gadget/udc/gr_udc.c index 39b7136..b16f8af 100644 --- a/drivers/usb/gadget/udc/gr_udc.c +++ b/drivers/usb/gadget/udc/gr_udc.c @@ -1539,7 +1539,7 @@ static int gr_ep_enable(struct usb_ep *_ep, * additional transactions. */ max = 0x7ff & usb_endpoint_maxp(desc); - nt = 0x3 & (usb_endpoint_maxp(desc) >> 11); + nt = usb_endpoint_maxp_mult(desc) - 1; buffer_size = GR_BUFFER_SIZE(epctrl); if (nt && (mode == 0 || mode == 2)) { dev_err(dev->dev, |