[PATCH 09/16] usb: gadget: update os_desc_config when add config
peng.fan at nxp.com
peng.fan at nxp.com
Wed Sep 16 15:25:30 CEST 2020
From: Jun Li <jun.li at nxp.com>
Always use the new added config for os_desc_config to fix cdev->
os_desc_config may miss set in case we restart usb gadget driver.
Signed-off-by: Li Jun <jun.li at nxp.com>
Signed-off-by: Peng Fan <peng.fan at nxp.com>
---
drivers/usb/gadget/composite.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index 071b4b4a6f..b453055838 100644
--- a/drivers/usb/gadget/composite.c
+++ b/drivers/usb/gadget/composite.c
@@ -512,8 +512,8 @@ int usb_add_config(struct usb_composite_dev *cdev,
usb_ep_autoconfig_reset(cdev->gadget);
- if (os_desc_config)
- cdev->os_desc_config = os_desc_config;
+ os_desc_config = config;
+ cdev->os_desc_config = os_desc_config;
done:
if (status)
--
2.28.0
More information about the U-Boot
mailing list