diff options
author | Jun Li <jun.li@nxp.com> | 2021-01-25 21:43:53 +0800 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2021-01-31 14:08:56 +0100 |
commit | 42a594de14637f809050cd2e2ea8b4a7f51bb31a (patch) | |
tree | 86397a70e18e8239b94b504839b44ffb67c1311e | |
parent | 4e643671f53173bf0f95f11e3b5a1872ffe029d3 (diff) | |
download | u-boot-42a594de14637f809050cd2e2ea8b4a7f51bb31a.zip u-boot-42a594de14637f809050cd2e2ea8b4a7f51bb31a.tar.gz u-boot-42a594de14637f809050cd2e2ea8b4a7f51bb31a.tar.bz2 |
usb: gadget: update os_desc_config when add config
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@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
-rw-r--r-- | drivers/usb/gadget/composite.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index e6fdefd..404da12 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) |