xserver: Branch 'pci-rework'

Ian Romanick idr at kemper.freedesktop.org
Fri Jan 12 20:49:43 EET 2007


 hw/xfree86/common/xf86.h       |    1 -
 hw/xfree86/common/xf86pciBus.c |   35 ++++++++++++++---------------------
 hw/xfree86/loader/xf86sym.c    |    1 -
 3 files changed, 14 insertions(+), 23 deletions(-)

New commits:
diff-tree dd12a94885bad9c9d064dcf7e0d9a7a7114ae3e6 (from c3016a29964761478305cf2f5241c563ff3eab0a)
Author: Ian Romanick <idr at us.ibm.com>
Date:   Fri Jan 12 10:21:25 2007 -0800

    Eliminate xf86GetPciEntity from public interface.
    
    xf86GetPciEntity was folded into the only place (xf86CheckPciSlot) in
    the tree that still called it.

diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h
index e96157e..d7fd045 100644
--- a/hw/xfree86/common/xf86.h
+++ b/hw/xfree86/common/xf86.h
@@ -134,7 +134,6 @@ GDevPtr xf86GetDevFromEntity(int entityI
 void xf86RemoveEntityFromScreen(ScrnInfoPtr pScrn, int entityIndex);
 EntityInfoPtr xf86GetEntityInfo(int entityIndex);
 struct pci_device * xf86GetPciInfoForEntity(int entityIndex);
-int xf86GetPciEntity(int bus, int dev, int func);
 Bool xf86SetEntityFuncs(int entityIndex, EntityProc init,
 			EntityProc enter, EntityProc leave, pointer);
 void xf86DeallocateResourcesForEntity(int entityIndex, unsigned long type);
diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c
index 5f09fab..e54de14 100644
--- a/hw/xfree86/common/xf86pciBus.c
+++ b/hw/xfree86/common/xf86pciBus.c
@@ -1002,24 +1002,6 @@ xf86GetPciInfoForEntity(int entityIndex)
       : NULL;
 }
 
-_X_EXPORT int
-xf86GetPciEntity(int bus, int dev, int func)
-{
-    int i;
-    
-    for (i = 0; i < xf86NumEntities; i++) {
-	const EntityPtr p = xf86Entities[i];
-
-	if ((p->busType == BUS_PCI) &&
-	    (p->pciBusId.bus == bus) &&
-	    (p->pciBusId.device == dev) &&
-	    (p->pciBusId.func == func)) {
-	    return i;
-	}
-    }
-    return -1;
-}
-
 /*
  * xf86CheckPciMemBase() checks that the memory base value matches one of the
  * PCI base address register values for the given PCI device.
@@ -1040,10 +1022,21 @@ xf86CheckPciMemBase( struct pci_device *
  */
 
 _X_EXPORT Bool
-xf86CheckPciSlot( const struct pci_device * d )
+xf86CheckPciSlot(const struct pci_device *d)
 {
-    return (xf86GetPciEntity(PCI_MAKE_BUS(d->domain, d->bus),
-			     d->dev, d->func) == -1);
+    int i;
+
+    for (i = 0; i < xf86NumEntities; i++) {
+	const EntityPtr p = xf86Entities[i];
+
+	if ((p->busType == BUS_PCI) &&
+	    (p->pciBusId.bus == PCI_MAKE_BUS(d->domain, d->bus)) &&
+	    (p->pciBusId.device == d->dev) &&
+	    (p->pciBusId.func == d->func)) {
+	    return FALSE;
+	}
+    }
+    return TRUE;
 }
 
 
diff --git a/hw/xfree86/loader/xf86sym.c b/hw/xfree86/loader/xf86sym.c
index 5e7a288..744064a 100644
--- a/hw/xfree86/loader/xf86sym.c
+++ b/hw/xfree86/loader/xf86sym.c
@@ -298,7 +298,6 @@ _X_HIDDEN void *xfree86LookupTab[] = {
     /* xf86Bus.c */
     SYMFUNC(xf86CheckPciSlot)
     SYMFUNC(xf86ClaimPciSlot)
-    SYMFUNC(xf86GetPciEntity)
     SYMFUNC(xf86ClaimIsaSlot)
     SYMFUNC(xf86ClaimFbSlot)
     SYMFUNC(xf86ClaimNoSlot)



More information about the xorg-commit mailing list