summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2018-06-23 05:19:50 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2018-06-23 05:19:50 -0700
commit313c0efc10963e357e207f367f2d109c8645e7c5 (patch)
tree0f35435c42de296524767e4e1ec32933737aa0a0
parent946085b74b1073b8cc921e912cea18aa36d64f3a (diff)
parent8b8a942bd12d03091b6e741ded03c5db24f97f73 (diff)
Merge "usb: gadget: configfs: Correct usb functions order for UDC gadget bind"
-rw-r--r--drivers/usb/gadget/configfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/gadget/configfs.c b/drivers/usb/gadget/configfs.c
index 1a2af68ca93d..a31322ed9447 100644
--- a/drivers/usb/gadget/configfs.c
+++ b/drivers/usb/gadget/configfs.c
@@ -1259,9 +1259,9 @@ static void purge_configs_funcs(struct gadget_info *gi)
cfg = container_of(c, struct config_usb_cfg, c);
- list_for_each_entry_safe(f, tmp, &c->functions, list) {
+ list_for_each_entry_safe_reverse(f, tmp, &c->functions, list) {
- list_move_tail(&f->list, &cfg->func_list);
+ list_move(&f->list, &cfg->func_list);
if (f->unbind) {
dev_err(&gi->cdev.gadget->dev, "unbind function"
" '%s'/%pK\n", f->name, f);