From: Felipe Balbi Date: Wed, 28 Sep 2016 10:35:15 +0000 (+0300) Subject: usb: gadget: udc: fusb300: make use of new usb_endpoint_maxp_mult() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=2f237451a815775d8616fe5dca9272839357a86b;p=linux-beck.git 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 --- 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);