Bus: Delete some obfuscatory macros
This commit is contained in:
parent
8eca37cb89
commit
9ff6180161
|
@ -218,13 +218,13 @@ xf86IsEntityPrimary(int entityIndex)
|
||||||
{
|
{
|
||||||
EntityPtr pEnt = xf86Entities[entityIndex];
|
EntityPtr pEnt = xf86Entities[entityIndex];
|
||||||
|
|
||||||
if (primaryBus.type != pEnt->busType) return FALSE;
|
if (primaryBus.type != pEnt->bus.type) return FALSE;
|
||||||
|
|
||||||
switch (pEnt->busType) {
|
switch (pEnt->bus.type) {
|
||||||
case BUS_PCI:
|
case BUS_PCI:
|
||||||
return (pEnt->bus.id.pci == primaryBus.id.pci);
|
return (pEnt->bus.id.pci == primaryBus.id.pci);
|
||||||
case BUS_SBUS:
|
case BUS_SBUS:
|
||||||
return (pEnt->sbusBusId.fbNum == primaryBus.id.sbus.fbNum);
|
return (pEnt->bus.id.sbus.fbNum == primaryBus.id.sbus.fbNum);
|
||||||
default:
|
default:
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -1000,9 +1000,9 @@ needCheck(resPtr pRes, unsigned long type, int entityIndex, xf86State state)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entityIndex > -1)
|
if (entityIndex > -1)
|
||||||
loc = xf86Entities[entityIndex]->busType;
|
loc = xf86Entities[entityIndex]->bus.type;
|
||||||
if (pRes->entityIndex > -1)
|
if (pRes->entityIndex > -1)
|
||||||
r_loc = xf86Entities[pRes->entityIndex]->busType;
|
r_loc = xf86Entities[pRes->entityIndex]->bus.type;
|
||||||
|
|
||||||
if ((type & ResAccMask) == ResShared &&
|
if ((type & ResAccMask) == ResShared &&
|
||||||
(pRes->res_type & ResAccMask) == ResShared)
|
(pRes->res_type & ResAccMask) == ResShared)
|
||||||
|
@ -1295,7 +1295,7 @@ static void
|
||||||
convertRange2Host(int entityIndex, resRange *pRange)
|
convertRange2Host(int entityIndex, resRange *pRange)
|
||||||
{
|
{
|
||||||
if (pRange->type & ResBus) {
|
if (pRange->type & ResBus) {
|
||||||
switch (xf86Entities[entityIndex]->busType) {
|
switch (xf86Entities[entityIndex]->bus.type) {
|
||||||
case BUS_PCI:
|
case BUS_PCI:
|
||||||
pciConvertRange2Host(entityIndex,pRange);
|
pciConvertRange2Host(entityIndex,pRange);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -89,10 +89,6 @@ typedef struct {
|
||||||
|
|
||||||
#define NEED_SHARED (NEED_MEM_SHARED | NEED_IO_SHARED)
|
#define NEED_SHARED (NEED_MEM_SHARED | NEED_IO_SHARED)
|
||||||
|
|
||||||
#define busType bus.type
|
|
||||||
#define isaBusId bus.id.isa
|
|
||||||
#define sbusBusId bus.id.sbus
|
|
||||||
|
|
||||||
struct x_BusAccRec;
|
struct x_BusAccRec;
|
||||||
typedef void (*BusAccProcPtr)(struct x_BusAccRec *ptr);
|
typedef void (*BusAccProcPtr)(struct x_BusAccRec *ptr);
|
||||||
|
|
||||||
|
|
|
@ -483,7 +483,7 @@ probe_devices_from_device_sections(DriverPtr drvp)
|
||||||
|
|
||||||
for ( k = 0; k < xf86NumEntities; k++ ) {
|
for ( k = 0; k < xf86NumEntities; k++ ) {
|
||||||
EntityPtr pEnt = xf86Entities[k];
|
EntityPtr pEnt = xf86Entities[k];
|
||||||
if (pEnt->busType != BUS_PCI)
|
if (pEnt->bus.type != BUS_PCI)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (pEnt->bus.id.pci == pPci) {
|
if (pEnt->bus.id.pci == pPci) {
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2000-2001 by The XFree86 Project, Inc.
|
* Copyright (c) 2000-2001 by The XFree86 Project, Inc.
|
||||||
*
|
*
|
||||||
|
@ -63,7 +62,7 @@ xf86ClaimFbSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active)
|
||||||
p = xf86Entities[num];
|
p = xf86Entities[num];
|
||||||
p->driver = drvp;
|
p->driver = drvp;
|
||||||
p->chipset = 0;
|
p->chipset = 0;
|
||||||
p->busType = BUS_NONE;
|
p->bus.type = BUS_NONE;
|
||||||
p->active = active;
|
p->active = active;
|
||||||
p->inUse = FALSE;
|
p->inUse = FALSE;
|
||||||
xf86AddDevToEntity(num, dev);
|
xf86AddDevToEntity(num, dev);
|
||||||
|
@ -88,7 +87,7 @@ xf86GetFbInfoForScreen(int scrnIndex)
|
||||||
|
|
||||||
for (i = 0; i < xf86Screens[scrnIndex]->numEntities; i++) {
|
for (i = 0; i < xf86Screens[scrnIndex]->numEntities; i++) {
|
||||||
p = xf86Entities[xf86Screens[scrnIndex]->entityList[i]];
|
p = xf86Entities[xf86Screens[scrnIndex]->entityList[i]];
|
||||||
if (p->busType == BUS_NONE) {
|
if (p->bus.type == BUS_NONE) {
|
||||||
num++;
|
num++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2000-2002 by The XFree86 Project, Inc.
|
* Copyright (c) 2000-2002 by The XFree86 Project, Inc.
|
||||||
*
|
*
|
||||||
|
@ -61,7 +60,7 @@ xf86ClaimNoSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active)
|
||||||
p = xf86Entities[num];
|
p = xf86Entities[num];
|
||||||
p->driver = drvp;
|
p->driver = drvp;
|
||||||
p->chipset = 0;
|
p->chipset = 0;
|
||||||
p->busType = BUS_NONE;
|
p->bus.type = BUS_NONE;
|
||||||
p->active = active;
|
p->active = active;
|
||||||
p->inUse = FALSE;
|
p->inUse = FALSE;
|
||||||
xf86AddDevToEntity(num, dev);
|
xf86AddDevToEntity(num, dev);
|
||||||
|
|
|
@ -320,7 +320,7 @@ xf86CheckSbusSlot(int fbNum)
|
||||||
for (i = 0; i < xf86NumEntities; i++) {
|
for (i = 0; i < xf86NumEntities; i++) {
|
||||||
p = xf86Entities[i];
|
p = xf86Entities[i];
|
||||||
/* Check if this SBUS slot is taken */
|
/* Check if this SBUS slot is taken */
|
||||||
if (p->busType == BUS_SBUS && p->sbusBusId.fbNum == fbNum)
|
if (p->bus.type == BUS_SBUS && p->bus.id.sbus.fbNum == fbNum)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -345,9 +345,9 @@ xf86ClaimSbusSlot(sbusDevicePtr psdp, DriverPtr drvp,
|
||||||
p = xf86Entities[num];
|
p = xf86Entities[num];
|
||||||
p->driver = drvp;
|
p->driver = drvp;
|
||||||
p->chipset = -1;
|
p->chipset = -1;
|
||||||
p->busType = BUS_SBUS;
|
p->bus.type = BUS_SBUS;
|
||||||
xf86AddDevToEntity(num, dev);
|
xf86AddDevToEntity(num, dev);
|
||||||
p->sbusBusId.fbNum = psdp->fbNum;
|
p->bus.id.sbus.fbNum = psdp->fbNum;
|
||||||
p->active = active;
|
p->active = active;
|
||||||
p->inUse = FALSE;
|
p->inUse = FALSE;
|
||||||
/* Here we initialize the access structure */
|
/* Here we initialize the access structure */
|
||||||
|
@ -543,10 +543,10 @@ xf86GetSbusInfoForEntity(int entityIndex)
|
||||||
EntityPtr p = xf86Entities[entityIndex];
|
EntityPtr p = xf86Entities[entityIndex];
|
||||||
|
|
||||||
if (entityIndex >= xf86NumEntities
|
if (entityIndex >= xf86NumEntities
|
||||||
|| p->busType != BUS_SBUS) return NULL;
|
|| p->bus.type != BUS_SBUS) return NULL;
|
||||||
|
|
||||||
for (psdpp = xf86SbusInfo; *psdpp != NULL; psdpp++) {
|
for (psdpp = xf86SbusInfo; *psdpp != NULL; psdpp++) {
|
||||||
if (p->sbusBusId.fbNum == (*psdpp)->fbNum)
|
if (p->bus.id.sbus.fbNum == (*psdpp)->fbNum)
|
||||||
return (*psdpp);
|
return (*psdpp);
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -559,9 +559,9 @@ xf86GetEntityForSbusInfo(sbusDevicePtr psdp)
|
||||||
|
|
||||||
for (i = 0; i < xf86NumEntities; i++) {
|
for (i = 0; i < xf86NumEntities; i++) {
|
||||||
EntityPtr p = xf86Entities[i];
|
EntityPtr p = xf86Entities[i];
|
||||||
if (p->busType != BUS_SBUS) continue;
|
if (p->bus.type != BUS_SBUS) continue;
|
||||||
|
|
||||||
if (p->sbusBusId.fbNum == psdp->fbNum)
|
if (p->bus.id.sbus.fbNum == psdp->fbNum)
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user