firmware/br-ext-chip-goke/board/gk7205v200/kernel/patches/00_drivers-usb-gadget-compo...

37 lines
998 B
Diff

--- linux-4.9.37/drivers/usb/gadget/composite.c 2017-07-12 16:42:41.000000000 +0300
+++ linux-4.9.y/drivers/usb/gadget/composite.c 2021-06-07 13:01:34.000000000 +0300
@@ -205,7 +205,7 @@
if (g->speed == USB_SPEED_HIGH && (usb_endpoint_xfer_isoc(_ep->desc) ||
usb_endpoint_xfer_int(_ep->desc)))
- _ep->mult = ((usb_endpoint_maxp(_ep->desc) & 0x1800) >> 11) + 1;
+ _ep->mult = usb_endpoint_maxp_mult(_ep->desc);
if (!want_comp_desc)
return 0;
@@ -315,6 +315,9 @@
list_del(&f->list);
if (f->unbind)
f->unbind(c, f);
+
+ if (f->bind_deactivated)
+ usb_function_activate(f);
}
EXPORT_SYMBOL_GPL(usb_remove_function);
@@ -956,12 +959,8 @@
f = list_first_entry(&config->functions,
struct usb_function, list);
- list_del(&f->list);
- if (f->unbind) {
- DBG(cdev, "unbind function '%s'/%p\n", f->name, f);
- f->unbind(config, f);
- /* may free memory for "f" */
- }
+
+ usb_remove_function(config, f);
}
list_del(&config->list);
if (config->unbind) {