diff options
Diffstat (limited to 'Kernel/Graphics/DisplayConnector.cpp')
-rw-r--r-- | Kernel/Graphics/DisplayConnector.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/Kernel/Graphics/DisplayConnector.cpp b/Kernel/Graphics/DisplayConnector.cpp index 9cf8f327b8..4f117b8490 100644 --- a/Kernel/Graphics/DisplayConnector.cpp +++ b/Kernel/Graphics/DisplayConnector.cpp @@ -62,10 +62,8 @@ void DisplayConnector::will_be_destroyed() GraphicsManagement::the().detach_display_connector({}, *this); VERIFY(m_symlink_sysfs_component); - VERIFY(!is_block_device()); - SysFSCharacterDevicesDirectory::the().m_child_components.with([&](auto& list) -> void { - list.remove(*m_symlink_sysfs_component); - }); + before_will_be_destroyed_remove_symlink_from_device_identifier_directory(); + m_symlink_sysfs_component.clear(); SysFSDisplayConnectorsDirectory::the().unplug({}, *m_sysfs_device_directory); before_will_be_destroyed_remove_from_device_management(); @@ -80,10 +78,7 @@ void DisplayConnector::after_inserting() VERIFY(!m_symlink_sysfs_component); auto sys_fs_component = MUST(SysFSSymbolicLinkDeviceComponent::try_create(SysFSDeviceIdentifiersDirectory::the(), *this, *m_sysfs_device_directory)); m_symlink_sysfs_component = sys_fs_component; - VERIFY(!is_block_device()); - SysFSCharacterDevicesDirectory::the().m_child_components.with([&](auto& list) -> void { - list.append(*m_symlink_sysfs_component); - }); + after_inserting_add_symlink_to_device_identifier_directory(); auto rounded_size = MUST(Memory::page_round_up(m_framebuffer_resource_size)); |