usbdev: clear configid after class disconnect

In class disconnect, resetconfig will be performed based on
configid, so configid should be cleared after disconnect.

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
This commit is contained in:
zhangyuan21 2023-08-14 11:38:38 +08:00 committed by Xiang Xiao
parent f2f0d7fbad
commit 1e7678c58a

View file

@ -746,13 +746,13 @@ static void composite_disconnect(FAR struct usbdevclass_driver_s *driver,
*/
flags = enter_critical_section();
priv->config = COMPOSITE_CONFIGIDNONE;
for (i = 0; i < priv->ndevices; i++)
{
CLASS_DISCONNECT(priv->device[i].dev, dev);
}
priv->config = COMPOSITE_CONFIGIDNONE;
leave_critical_section(flags);
/* Perform the soft connect function so that we will we can be