From 213fa47dacf07d11f094ff58a5695cd0c425e164 Mon Sep 17 00:00:00 2001 From: Ye Li Date: Mon, 29 Jun 2020 10:12:26 +0800 Subject: 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 Signed-off-by: Ye Li Signed-off-by: Peng Fan --- include/usb_mass_storage.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/usb_mass_storage.h b/include/usb_mass_storage.h index c7b770fa3e8..08ccc97cf22 100644 --- a/include/usb_mass_storage.h +++ b/include/usb_mass_storage.h @@ -25,7 +25,7 @@ struct ums { struct blk_desc block_dev; }; -int fsg_init(struct ums *ums_devs, int count); +int fsg_init(struct ums *ums_devs, int count, unsigned int controller_idx); void fsg_cleanup(void); int fsg_main_thread(void *); int fsg_add(struct usb_configuration *c); -- cgit v1.2.3