summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget
diff options
context:
space:
mode:
authorFelipe Balbi <felipe.balbi@linux.intel.com>2016-09-28 13:35:15 +0300
committerFelipe Balbi <felipe.balbi@linux.intel.com>2016-11-03 10:38:19 +0200
commit2f237451a815775d8616fe5dca9272839357a86b (patch)
tree97184ac1ff5a8792612cabc149001a2a3bffda42 /drivers/usb/gadget
parent4250914d3a298aea7a6e940180d225b64e95a6e3 (diff)
downloadlinux-2f237451a815775d8616fe5dca9272839357a86b.tar.bz2
usb: gadget: udc: fusb300: 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>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r--drivers/usb/gadget/udc/fusb300_udc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/udc/fusb300_udc.c b/drivers/usb/gadget/udc/fusb300_udc.c
index 948845c90e47..42ff308578df 100644
--- a/drivers/usb/gadget/udc/fusb300_udc.c
+++ b/drivers/usb/gadget/udc/fusb300_udc.c
@@ -218,7 +218,7 @@ static int config_ep(struct fusb300_ep *ep,
(info.type == USB_ENDPOINT_XFER_ISOC)) {
info.interval = desc->bInterval;
if (info.type == USB_ENDPOINT_XFER_ISOC)
- info.bw_num = ((desc->wMaxPacketSize & 0x1800) >> 11);
+ info.bw_num = usb_endpoint_maxp_mult(desc);
}
ep_fifo_setting(fusb300, info);