Eliminate xf86GetPciEntity from public interface.

xf86GetPciEntity was folded into the only place (xf86CheckPciSlot) in
the tree that still called it.
This commit is contained in:
Ian Romanick 2007-01-12 10:21:25 -08:00
parent c3016a2996
commit dd12a94885
3 changed files with 14 additions and 23 deletions

View File

@ -134,7 +134,6 @@ GDevPtr xf86GetDevFromEntity(int entityIndex, int instance);
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);

View File

@ -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 * pPci, memType base )
*/
_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;
}

View File

@ -298,7 +298,6 @@ _X_HIDDEN void *xfree86LookupTab[] = {
/* xf86Bus.c */
SYMFUNC(xf86CheckPciSlot)
SYMFUNC(xf86ClaimPciSlot)
SYMFUNC(xf86GetPciEntity)
SYMFUNC(xf86ClaimIsaSlot)
SYMFUNC(xf86ClaimFbSlot)
SYMFUNC(xf86ClaimNoSlot)