diff options
author | Andreas Kling <kling@serenityos.org> | 2020-04-08 16:56:36 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-04-08 17:19:46 +0200 |
commit | e1709a0904cfe6238035315247bbdaf620d2e7e2 (patch) | |
tree | 7775f9842ea75993c48e8f52cd0a3930d22cac91 /Kernel/Net | |
parent | e5a20697da7029ca6fc14caa385770d657859cb8 (diff) | |
download | serenity-e1709a0904cfe6238035315247bbdaf620d2e7e2.zip |
Kernel: Remove an unnecessary layer of indirection in the PCI code
The PCI access layer was composed of a bunch of virtual functions that
did nothing but call other virtual functions. The first layer was never
overridden so there was no need for them to be virtual.
This patch removes the indirection and moves logic from PCI::Access
down into the various PCI::get_foo() helpers that were the sole users.
Diffstat (limited to 'Kernel/Net')
-rw-r--r-- | Kernel/Net/E1000NetworkAdapter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Net/E1000NetworkAdapter.cpp b/Kernel/Net/E1000NetworkAdapter.cpp index bfcdd8cf4c..b83beb62b7 100644 --- a/Kernel/Net/E1000NetworkAdapter.cpp +++ b/Kernel/Net/E1000NetworkAdapter.cpp @@ -163,7 +163,7 @@ E1000NetworkAdapter::E1000NetworkAdapter(PCI::Address address, u8 irq) enable_bus_mastering(pci_address()); - size_t mmio_base_size = PCI::get_BAR_Space_Size(pci_address(), 0); + size_t mmio_base_size = PCI::get_BAR_space_size(pci_address(), 0); m_mmio_region = MM.allocate_kernel_region(PhysicalAddress(page_base_of(PCI::get_BAR0(pci_address()))), PAGE_ROUND_UP(mmio_base_size), "E1000 MMIO", Region::Access::Read | Region::Access::Write, false, false); m_mmio_base = m_mmio_region->vaddr(); m_use_mmio = true; |