summaryrefslogtreecommitdiff
path: root/src/i810_driver.c
diff options
context:
space:
mode:
authorWang Zhenyu <zhenyu.z.wang@intel.com>2006-12-04 15:48:04 +0800
committerKeith Packard <keithp@neko.keithp.com>2007-01-06 15:06:39 -0800
commit736d82a6b43f174cb95b425faacd4b0b889916fa (patch)
tree287256c97eef955a5b2f9a48986134ef24d01630 /src/i810_driver.c
parent53b42f5bc7a58d02106436486e5bb56e56dbbfa1 (diff)
parent4c790f614ecba1f6468e51779cfaf0e36b6b17ad (diff)
Merge branch 'modesetting-origin' into modesetting
Diffstat (limited to 'src/i810_driver.c')
-rw-r--r--src/i810_driver.c45
1 files changed, 23 insertions, 22 deletions
diff --git a/src/i810_driver.c b/src/i810_driver.c
index 6ba0030c..7574fb51 100644
--- a/src/i810_driver.c
+++ b/src/i810_driver.c
@@ -381,7 +381,7 @@ static int i810_pitches[] = {
#endif
#endif
-int I830EntityIndex = -1;
+static int I830EntityIndex = -1;
#ifdef XFree86LOADER
@@ -400,7 +400,7 @@ static XF86ModuleVersionInfo i810VersRec = {
{0, 0, 0, 0}
};
-_X_EXPORT XF86ModuleData i810ModuleData = { &i810VersRec, i810Setup, 0 };
+_X_EXPORT XF86ModuleData i810ModuleData = { &i810VersRec, i810Setup, NULL };
static pointer
i810Setup(pointer module, pointer opts, int *errmaj, int *errmin)
@@ -468,7 +468,7 @@ I810FreeRec(ScrnInfoPtr pScrn)
if (!pScrn->driverPrivate)
return;
xfree(pScrn->driverPrivate);
- pScrn->driverPrivate = 0;
+ pScrn->driverPrivate = NULL;
}
#endif
@@ -577,7 +577,8 @@ I810Probe(DriverPtr drv, int flags)
/* Allocate new ScrnInfoRec and claim the slot */
if ((pScrn = xf86ConfigPciEntity(pScrn, 0, usedChips[i],
- I810PciChipsets, 0, 0, 0, 0, 0))) {
+ I810PciChipsets, NULL, NULL, NULL,
+ NULL, NULL))) {
EntityInfoPtr pEnt;
pEnt = xf86GetEntityInfo(usedChips[i]);
@@ -609,23 +610,23 @@ I810Probe(DriverPtr drv, int flags)
if (I830EntityIndex < 0)
I830EntityIndex = xf86AllocateEntityPrivateIndex();
- pPriv = xf86GetEntityPrivate(pScrn->entityList[0],
+ pPriv = xf86GetEntityPrivate(pScrn->entityList[0],
I830EntityIndex);
- if (!pPriv->ptr) {
- pPriv->ptr = xnfcalloc(sizeof(I830EntRec), 1);
- pI830Ent = pPriv->ptr;
- pI830Ent->lastInstance = -1;
- } else {
- pI830Ent = pPriv->ptr;
+ if (!pPriv->ptr) {
+ pPriv->ptr = xnfcalloc(sizeof(I830EntRec), 1);
+ pI830Ent = pPriv->ptr;
+ pI830Ent->lastInstance = -1;
+ } else {
+ pI830Ent = pPriv->ptr;
}
-
- /*
- * Set the entity instance for this instance of the driver.
- * For dual head per card, instance 0 is the "master"
- * instance, driving the primary head, and instance 1 is
- * the "slave".
- */
- pI830Ent->lastInstance++;
+
+ /*
+ * Set the entity instance for this instance of the driver.
+ * For dual head per card, instance 0 is the "master"
+ * instance, driving the primary head, and instance 1 is
+ * the "slave".
+ */
+ pI830Ent->lastInstance++;
xf86SetEntityInstanceForScreen(pScrn,
pScrn->entityList[0], pI830Ent->lastInstance);
I830InitpScrn(pScrn);
@@ -746,7 +747,7 @@ I810PreInit(ScrnInfoPtr pScrn, int flags)
pI810->PciTag = pciTag(pI810->PciInfo->bus, pI810->PciInfo->device,
pI810->PciInfo->func);
- if (xf86RegisterResources(pI810->pEnt->index, 0, ResNone))
+ if (xf86RegisterResources(pI810->pEnt->index, NULL, ResNone))
return FALSE;
pScrn->racMemFlags = RAC_FB | RAC_COLORMAP;
@@ -1222,7 +1223,7 @@ I810UnmapMMIO(ScrnInfoPtr pScrn)
xf86UnMapVidMem(pScrn->scrnIndex, (pointer) pI810->MMIOBase,
I810_REG_SIZE);
- pI810->MMIOBase = 0;
+ pI810->MMIOBase = NULL;
}
static Bool
@@ -1232,7 +1233,7 @@ I810UnmapMem(ScrnInfoPtr pScrn)
xf86UnMapVidMem(pScrn->scrnIndex, (pointer) pI810->FbBase,
pI810->FbMapSize);
- pI810->FbBase = 0;
+ pI810->FbBase = NULL;
I810UnmapMMIO(pScrn);
return TRUE;
}