diff options
| author | sakumisu <[email protected]> | 2025-06-04 13:08:51 +0800 |
|---|---|---|
| committer | sakumisu <[email protected]> | 2025-06-04 13:08:51 +0800 |
| commit | 6b7d755d3af4154c8e4ae7b11ab8a961c29aceec (patch) | |
| tree | 0e2790d9c202004a510eebb582c53356c8608b41 | |
| parent | 078e7d1be01ee709ecb644d705343475b091770a (diff) | |
update(class/hub/usbh_hub): reduce critical section range
Signed-off-by: sakumisu <[email protected]>
| -rw-r--r-- | class/hub/usbh_hub.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/class/hub/usbh_hub.c b/class/hub/usbh_hub.c index 7feb3001..4aa6be0f 100644 --- a/class/hub/usbh_hub.c +++ b/class/hub/usbh_hub.c @@ -706,8 +706,6 @@ int usbh_hub_deinitialize(struct usbh_bus *bus) struct usbh_hub *hub; size_t flags; - flags = usb_osal_enter_critical_section(); - hub = &bus->hcd.roothub; for (uint8_t port = 0; port < hub->nports; port++) { hport = &hub->child[port]; @@ -715,6 +713,8 @@ 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); |
