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
This commit is contained in:
Michael Lotz 2010-05-08 15:09:28 +00:00
parent 5e21079403
commit b59539c7ce
1 changed files with 11 additions and 0 deletions

View File

@ -3,6 +3,7 @@
* Distributed under the terms of the MIT License.
*/
#include <PCI.h>
#include <PCI_x86.h>
#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;
}