summaryrefslogtreecommitdiff
path: root/src/i810_driver.c
diff options
context:
space:
mode:
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;
}