mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:08:12 +00:00
Kernel/USB: Detach devices from their driver when they are detached
This commit is contained in:
parent
b4cd354bae
commit
d168bfabc4
3 changed files with 15 additions and 0 deletions
|
@ -295,6 +295,9 @@ void Hub::check_for_port_updates()
|
|||
auto* hub_child = static_cast<Hub*>(device_to_remove.ptr());
|
||||
hub_child->remove_children_from_sysfs();
|
||||
}
|
||||
|
||||
device_to_remove->detach();
|
||||
|
||||
m_children.remove(*device_to_remove);
|
||||
} else {
|
||||
dbgln_if(USB_DEBUG, "USB Hub: No child set up on port {}, ignoring detachment.", port_number);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue