aboutsummaryrefslogtreecommitdiff
path: root/kernel/kapi/devices.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/kapi/devices.cpp')
-rw-r--r--kernel/kapi/devices.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/kernel/kapi/devices.cpp b/kernel/kapi/devices.cpp
index f289bbf2..4480206a 100644
--- a/kernel/kapi/devices.cpp
+++ b/kernel/kapi/devices.cpp
@@ -42,6 +42,17 @@ namespace kapi::devices
return root_bus;
}
+ auto remove_device(device & device) -> bool
+ {
+ auto parent = device.parent();
+ if (!parent)
+ {
+ return false;
+ }
+
+ return parent->remove_child(device);
+ }
+
} // namespace kapi::devices
namespace kapi::test_support::devices