aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/os-support/bus/Pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xfree86/os-support/bus/Pci.c')
-rw-r--r--xorg-server/hw/xfree86/os-support/bus/Pci.c25
1 files changed, 7 insertions, 18 deletions
diff --git a/xorg-server/hw/xfree86/os-support/bus/Pci.c b/xorg-server/hw/xfree86/os-support/bus/Pci.c
index 064533c77..8ca2f1f9b 100644
--- a/xorg-server/hw/xfree86/os-support/bus/Pci.c
+++ b/xorg-server/hw/xfree86/os-support/bus/Pci.c
@@ -136,28 +136,17 @@
#include <pciaccess.h>
-#define PCI_MFDEV_SUPPORT 1 /* Include PCI multifunction device support */
-#define PCI_BRIDGE_SUPPORT 1 /* Include support for PCI-to-PCI bridges */
-
-/*
- * Global data
- */
-
-pciBusInfo_t *pciBusInfo[MAX_PCI_BUSES] = { NULL, };
-_X_EXPORT int pciNumBuses = 0; /* Actual number of PCI buses */
-int pciMaxBusNum = MAX_PCI_BUSES;
+/* Global data */
+pciBusFuncs_t *pciBusFuncs = NULL;
_X_EXPORT ADDRESS
pciBusAddrToHostAddr(PCITAG tag, PciAddrType type, ADDRESS addr)
{
- int bus = PCI_BUS_FROM_TAG(tag);
-
- if ((bus >= 0) && (bus < pciNumBuses) && pciBusInfo[bus] &&
- pciBusInfo[bus]->funcs->pciAddrBusToHost)
- return (*pciBusInfo[bus]->funcs->pciAddrBusToHost)(tag, type, addr);
- else
- return(addr);
+ if (pciBusFuncs && pciBusFuncs->pciAddrBusToHost)
+ return pciBusFuncs->pciAddrBusToHost(tag, type, addr);
+ else
+ return addr;
}
_X_EXPORT PCITAG
@@ -172,7 +161,7 @@ pciAddrNOOP(PCITAG tag, PciAddrType type, ADDRESS addr)
return(addr);
}
-_X_EXPORT Bool
+Bool
xf86scanpci(void)
{
Bool success = FALSE;