summaryrefslogtreecommitdiff
path: root/Kernel/PCI
diff options
context:
space:
mode:
authorLiav A <liavalb@gmail.com>2020-04-10 20:33:30 +0300
committerAndreas Kling <kling@serenityos.org>2020-04-11 10:02:31 +0200
commitea585639700e7c365cfea108211ef4a7f8872a12 (patch)
tree6aa0de22ed1a6046b7c90a9f5f441ca4559420f5 /Kernel/PCI
parent65f939b55c3d2c7c5e9f7f8baf4b748693bf513a (diff)
downloadserenity-ea585639700e7c365cfea108211ef4a7f8872a12.zip
Kernel: Instantiate network adapters in their own detect() methods
This commit is one step forward for pluggable driver modules. Instead of creating instances of network adapter classes, we let their detect() methods to figure out if there are existing devices to initialize.
Diffstat (limited to 'Kernel/PCI')
-rw-r--r--Kernel/PCI/Initializer.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/Kernel/PCI/Initializer.cpp b/Kernel/PCI/Initializer.cpp
index 6ae6575520..d31fc61673 100644
--- a/Kernel/PCI/Initializer.cpp
+++ b/Kernel/PCI/Initializer.cpp
@@ -58,11 +58,8 @@ void initialize()
MMIOAccess::initialize(ACPI::Parser::the()->find_table("MCFG"));
else
IOAccess::initialize();
-
- enumerate([&](const Address& address, ID id) {
+ PCI::enumerate([&](const Address& address, ID id) {
klog() << address << " " << id;
- E1000NetworkAdapter::detect(address);
- RTL8139NetworkAdapter::detect(address);
});
}