summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsakumisu <[email protected]>2025-11-04 21:50:43 +0800
committersakumisu <[email protected]>2025-11-04 21:58:34 +0800
commit32cf0e0b3cacde59a3461db76ae51b8430df7393 (patch)
tree7e15dbffdd40c3457bb41f5664ee25dbf9017847
parent88b1158b4f02f5a710002c3c58cbe236fea77e61 (diff)
fix(class/hub): delete thread before delete mq
Signed-off-by: sakumisu <[email protected]>
-rw-r--r--class/hub/usbh_hub.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/class/hub/usbh_hub.c b/class/hub/usbh_hub.c
index f414f1e9..a55043f6 100644
--- a/class/hub/usbh_hub.c
+++ b/class/hub/usbh_hub.c
@@ -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;
}