mirror of https://github.com/OpenIPC/firmware.git
23 lines
622 B
Diff
23 lines
622 B
Diff
--- linux-4.9.37/drivers/usb/gadget/configfs.c 2017-07-12 16:42:41.000000000 +0300
|
|
+++ linux-4.9.y/drivers/usb/gadget/configfs.c 2021-06-07 13:01:34.000000000 +0300
|
|
@@ -1209,6 +1209,9 @@
|
|
|
|
list_for_each_entry_safe(f, tmp, &c->functions, list) {
|
|
|
|
+ if (f->disable)
|
|
+ f->disable(f);
|
|
+
|
|
list_move_tail(&f->list, &cfg->func_list);
|
|
if (f->unbind) {
|
|
dev_dbg(&gi->cdev.gadget->dev,
|
|
@@ -1216,6 +1219,9 @@
|
|
f->name, f);
|
|
f->unbind(c, f);
|
|
}
|
|
+
|
|
+ if (f->bind_deactivated)
|
|
+ usb_function_activate(f);
|
|
}
|
|
c->next_interface_id = 0;
|
|
memset(c->interface, 0, sizeof(c->interface));
|