From b59539c7ce2085fe13dc9aaf81190c2cf5bae8ce Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Sat, 8 May 2010 15:09:28 +0000 Subject: [PATCH] Ensure that the PCI module is initialized when using the x86 specific module as it makes use of gPCI which is initialized during pci module init. Might help with #5936. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36745 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../bus_managers/pci/arch/x86/pci_arch_module.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/add-ons/kernel/bus_managers/pci/arch/x86/pci_arch_module.cpp b/src/add-ons/kernel/bus_managers/pci/arch/x86/pci_arch_module.cpp index a26b35daed..1ebb7005dc 100644 --- a/src/add-ons/kernel/bus_managers/pci/arch/x86/pci_arch_module.cpp +++ b/src/add-ons/kernel/bus_managers/pci/arch/x86/pci_arch_module.cpp @@ -3,6 +3,7 @@ * Distributed under the terms of the MIT License. */ +#include #include #include "pci_msi.h" @@ -12,7 +13,17 @@ pci_arch_module_std_ops(int32 op, ...) { switch (op) { case B_MODULE_INIT: + { + module_info *dummy; + status_t result = get_module(B_PCI_MODULE_NAME, &dummy); + if (result != B_OK) + return result; + + return B_OK; + } + case B_MODULE_UNINIT: + put_module(B_PCI_MODULE_NAME); return B_OK; }