usb: gadget: set correct usb_configuration for os_desc_config
authorJun Li <jun.li@nxp.com>
Mon, 25 Jan 2021 13:43:52 +0000 (21:43 +0800)
committerMarek Vasut <marex@denx.de>
Sun, 31 Jan 2021 13:08:56 +0000 (14:08 +0100)
commit4e643671f53173bf0f95f11e3b5a1872ffe029d3
tree8191a61b1045bc704025f24b9d08a19040833e8e
parent8043cf8fbd93dfceeec14a8c00eda292deaca938
usb: gadget: set correct usb_configuration for os_desc_config

The current way to set cdev->os_desc_config is wrong if user restart
fastboot, as the old config is not used anymore and new allocated
usb_configuration will be used, so set the os_desc_config while
usb_add_config.

Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
drivers/usb/gadget/composite.c