From a9050d54249ed9f54c6fe59143b846c9c7548f59 Mon Sep 17 00:00:00 2001 From: Tiago Vignatti Date: Mon, 25 Feb 2008 18:10:18 -0300 Subject: [PATCH] Jesus, pciInit() was called 32 times in my machine without need! xf86scanpci() will always call pciInit() before any other function, so there's no need to guarantee it after. --- hw/xfree86/os-support/bus/Pci.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/hw/xfree86/os-support/bus/Pci.c b/hw/xfree86/os-support/bus/Pci.c index 2d3f748e7..8b21fad59 100644 --- a/hw/xfree86/os-support/bus/Pci.c +++ b/hw/xfree86/os-support/bus/Pci.c @@ -154,11 +154,6 @@ int pciMaxBusNum = MAX_PCI_BUSES; static void pciInit(void) { - static int pciInitialized = 0; - - if (!pciInitialized) { - pciInitialized = 1; - /* XXX */ #if defined(DEBUGPCI) if (DEBUGPCI >= xf86Verbose) { @@ -167,7 +162,6 @@ pciInit(void) #endif ARCH_PCI_INIT(); - } } _X_EXPORT ADDRESS @@ -175,8 +169,6 @@ pciBusAddrToHostAddr(PCITAG tag, PciAddrType type, ADDRESS addr) { int bus = PCI_BUS_FROM_TAG(tag); - pciInit(); - if ((bus >= 0) && (bus < pciNumBuses) && pciBusInfo[bus] && pciBusInfo[bus]->funcs->pciAddrBusToHost) return (*pciBusInfo[bus]->funcs->pciAddrBusToHost)(tag, type, addr);