usb: gadget: udc: fusb300: make use of new usb_endpoint_maxp_mult()
authorFelipe Balbi <felipe.balbi@linux.intel.com>
Wed, 28 Sep 2016 10:35:15 +0000 (13:35 +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.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/gadget/udc/fusb300_udc.c

index 948845c90e47d3cf3333511f74673b2d7cd62daf..42ff308578df5c68751b86f59f10ecb8dec72ba5 100644 (file)
@@ -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);