usb: gadget: Fix controller index in UMS
The usb mass storage (f_mass_storage.c) uses fixed usb index 0,
this causes problem while CDNS3 USB controller index is 1.
Modify the API of fsg to pass the controller index.
Reviewed-by: Jun Li <jun.li@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
diff --git a/cmd/usb_mass_storage.c b/cmd/usb_mass_storage.c
index d565635..cf2f559 100644
--- a/cmd/usb_mass_storage.c
+++ b/cmd/usb_mass_storage.c
@@ -170,7 +170,7 @@
goto cleanup_ums_init;
}
- rc = fsg_init(ums, ums_count);
+ rc = fsg_init(ums, ums_count, controller_index);
if (rc) {
pr_err("fsg_init failed\n");
rc = CMD_RET_FAILURE;