Kernel: Implement DevFileSystem::remove_device

This function cleanly removes the devices from the whole filesystem.

USB devices are now removed from the filesystem as soon as they are
destroyed.
This commit is contained in:
2024-07-15 22:09:21 +03:00
parent 0578d41500
commit 9d7f97ccd5
3 changed files with 21 additions and 1 deletions

View File

@@ -78,7 +78,10 @@ namespace Kernel
{}
USBHIDDriver::~USBHIDDriver()
{}
{
if (m_hid_device)
DevFileSystem::get().remove_device(m_hid_device);
}
BAN::ErrorOr<void> USBHIDDriver::initialize()
{