fix(class/hub): delete thread before delete mq

Signed-off-by: sakumisu <1203593632@qq.com>
This commit is contained in:
sakumisu
2025-11-04 21:50:43 +08:00
parent 88b1158b4f
commit 32cf0e0b3c

View File

@@ -713,7 +713,6 @@ int usbh_hub_deinitialize(struct usbh_bus *bus)
{
struct usbh_hubport *hport;
struct usbh_hub *hub;
size_t flags;
hub = &bus->hcd.roothub;
for (uint8_t port = 0; port < hub->nports; port++) {
@@ -722,14 +721,10 @@ int usbh_hub_deinitialize(struct usbh_bus *bus)
usbh_hubport_release(hport);
}
flags = usb_osal_enter_critical_section();
usb_hc_deinit(bus);
usb_osal_leave_critical_section(flags);
usb_osal_mq_delete(bus->hub_mq);
usb_osal_thread_delete(bus->hub_thread);
usb_osal_mq_delete(bus->hub_mq);
return 0;
}