mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:28:11 +00:00
Kernel/SysFS: Reduce the responsibilities of the Registry object
Instead, let the /sys/dev/block and /sys/dev/char directories to handle the registering part of SysFSDeviceComponents by themselves.
This commit is contained in:
parent
ecc29bb52e
commit
6733f19b3c
11 changed files with 72 additions and 31 deletions
|
@ -31,15 +31,10 @@ UNMAP_AFTER_INIT SysFSComponentRegistry::SysFSComponentRegistry()
|
|||
|
||||
UNMAP_AFTER_INIT void SysFSComponentRegistry::register_new_component(SysFSComponent& component)
|
||||
{
|
||||
MutexLocker locker(m_lock);
|
||||
SpinlockLocker locker(m_root_directory_lock);
|
||||
m_root_directory->m_components.append(component);
|
||||
}
|
||||
|
||||
SysFSComponentRegistry::DevicesList& SysFSComponentRegistry::devices_list()
|
||||
{
|
||||
return m_devices_list;
|
||||
}
|
||||
|
||||
SysFSBusDirectory& SysFSComponentRegistry::buses_directory()
|
||||
{
|
||||
return *m_root_directory->m_buses_directory;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue