Skip to content

Commit 6b7d755

Browse files
committed
update(class/hub/usbh_hub): reduce critical section range
Signed-off-by: sakumisu <[email protected]>
1 parent 078e7d1 commit 6b7d755

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

class/hub/usbh_hub.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -706,15 +706,15 @@ int usbh_hub_deinitialize(struct usbh_bus *bus)
706706
struct usbh_hub *hub;
707707
size_t flags;
708708

709-
flags = usb_osal_enter_critical_section();
710-
711709
hub = &bus->hcd.roothub;
712710
for (uint8_t port = 0; port < hub->nports; port++) {
713711
hport = &hub->child[port];
714712

715713
usbh_hubport_release(hport);
716714
}
717715

716+
flags = usb_osal_enter_critical_section();
717+
718718
usb_hc_deinit(bus);
719719

720720
usb_osal_leave_critical_section(flags);

0 commit comments

Comments
 (0)