summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2009-01-26 06:23:09 -0500
committerAdam Jackson <ajax@redhat.com>2009-02-04 22:49:33 -0500
commit9ff6180161267e71ae750498da0ec4889cd5c260 (patch)
tree98e6bcbe6bb5f1083a9fce7da8cf330c7fd2e9f9
parent8eca37cb8934e79f02291460eb7b49a5d528f391 (diff)
Bus: Delete some obfuscatory macros
-rw-r--r--hw/xfree86/common/xf86Bus.c12
-rw-r--r--hw/xfree86/common/xf86Bus.h4
-rw-r--r--hw/xfree86/common/xf86Init.c2
-rw-r--r--hw/xfree86/common/xf86fbBus.c5
-rw-r--r--hw/xfree86/common/xf86noBus.c3
-rw-r--r--hw/xfree86/common/xf86sbusBus.c14
6 files changed, 17 insertions, 23 deletions
diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c
index d320078a8..8040f580b 100644
--- a/hw/xfree86/common/xf86Bus.c
+++ b/hw/xfree86/common/xf86Bus.c
@@ -218,13 +218,13 @@ xf86IsEntityPrimary(int 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:
return (pEnt->bus.id.pci == primaryBus.id.pci);
case BUS_SBUS:
- return (pEnt->sbusBusId.fbNum == primaryBus.id.sbus.fbNum);
+ return (pEnt->bus.id.sbus.fbNum == primaryBus.id.sbus.fbNum);
default:
return FALSE;
}
@@ -1000,9 +1000,9 @@ needCheck(resPtr pRes, unsigned long type, int entityIndex, xf86State state)
}
if (entityIndex > -1)
- loc = xf86Entities[entityIndex]->busType;
+ loc = xf86Entities[entityIndex]->bus.type;
if (pRes->entityIndex > -1)
- r_loc = xf86Entities[pRes->entityIndex]->busType;
+ r_loc = xf86Entities[pRes->entityIndex]->bus.type;
if ((type & ResAccMask) == ResShared &&
(pRes->res_type & ResAccMask) == ResShared)
@@ -1295,7 +1295,7 @@ static void
convertRange2Host(int entityIndex, resRange *pRange)
{
if (pRange->type & ResBus) {
- switch (xf86Entities[entityIndex]->busType) {
+ switch (xf86Entities[entityIndex]->bus.type) {
case BUS_PCI:
pciConvertRange2Host(entityIndex,pRange);
break;
diff --git a/hw/xfree86/common/xf86Bus.h b/hw/xfree86/common/xf86Bus.h
index 518294cf7..83ba83c85 100644
--- a/hw/xfree86/common/xf86Bus.h
+++ b/hw/xfree86/common/xf86Bus.h
@@ -89,10 +89,6 @@ typedef struct {
#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;
typedef void (*BusAccProcPtr)(struct x_BusAccRec *ptr);
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 97b703d31..2c4be84c6 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -483,7 +483,7 @@ probe_devices_from_device_sections(DriverPtr drvp)
for ( k = 0; k < xf86NumEntities; k++ ) {
EntityPtr pEnt = xf86Entities[k];
- if (pEnt->busType != BUS_PCI)
+ if (pEnt->bus.type != BUS_PCI)
continue;
if (pEnt->bus.id.pci == pPci) {
diff --git a/hw/xfree86/common/xf86fbBus.c b/hw/xfree86/common/xf86fbBus.c
index 552b9f8b1..a18963991 100644
--- a/hw/xfree86/common/xf86fbBus.c
+++ b/hw/xfree86/common/xf86fbBus.c
@@ -1,4 +1,3 @@
-
/*
* 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->driver = drvp;
p->chipset = 0;
- p->busType = BUS_NONE;
+ p->bus.type = BUS_NONE;
p->active = active;
p->inUse = FALSE;
xf86AddDevToEntity(num, dev);
@@ -88,7 +87,7 @@ xf86GetFbInfoForScreen(int scrnIndex)
for (i = 0; i < xf86Screens[scrnIndex]->numEntities; i++) {
p = xf86Entities[xf86Screens[scrnIndex]->entityList[i]];
- if (p->busType == BUS_NONE) {
+ if (p->bus.type == BUS_NONE) {
num++;
}
}
diff --git a/hw/xfree86/common/xf86noBus.c b/hw/xfree86/common/xf86noBus.c
index d72674855..e7d4442cf 100644
--- a/hw/xfree86/common/xf86noBus.c
+++ b/hw/xfree86/common/xf86noBus.c
@@ -1,4 +1,3 @@
-
/*
* 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->driver = drvp;
p->chipset = 0;
- p->busType = BUS_NONE;
+ p->bus.type = BUS_NONE;
p->active = active;
p->inUse = FALSE;
xf86AddDevToEntity(num, dev);
diff --git a/hw/xfree86/common/xf86sbusBus.c b/hw/xfree86/common/xf86sbusBus.c
index a4caef3eb..924c2bcb6 100644
--- a/hw/xfree86/common/xf86sbusBus.c
+++ b/hw/xfree86/common/xf86sbusBus.c
@@ -320,7 +320,7 @@ xf86CheckSbusSlot(int fbNum)
for (i = 0; i < xf86NumEntities; i++) {
p = xf86Entities[i];
/* 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;
}
@@ -345,9 +345,9 @@ xf86ClaimSbusSlot(sbusDevicePtr psdp, DriverPtr drvp,
p = xf86Entities[num];
p->driver = drvp;
p->chipset = -1;
- p->busType = BUS_SBUS;
+ p->bus.type = BUS_SBUS;
xf86AddDevToEntity(num, dev);
- p->sbusBusId.fbNum = psdp->fbNum;
+ p->bus.id.sbus.fbNum = psdp->fbNum;
p->active = active;
p->inUse = FALSE;
/* Here we initialize the access structure */
@@ -543,10 +543,10 @@ xf86GetSbusInfoForEntity(int entityIndex)
EntityPtr p = xf86Entities[entityIndex];
if (entityIndex >= xf86NumEntities
- || p->busType != BUS_SBUS) return NULL;
+ || p->bus.type != BUS_SBUS) return NULL;
for (psdpp = xf86SbusInfo; *psdpp != NULL; psdpp++) {
- if (p->sbusBusId.fbNum == (*psdpp)->fbNum)
+ if (p->bus.id.sbus.fbNum == (*psdpp)->fbNum)
return (*psdpp);
}
return NULL;
@@ -559,9 +559,9 @@ xf86GetEntityForSbusInfo(sbusDevicePtr psdp)
for (i = 0; i < xf86NumEntities; 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 -1;