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 63a24d7c..584a8c23 100644
--- a/src/i810_driver.c
+++ b/src/i810_driver.c
@@ -383,7 +383,7 @@ static int i810_pitches[] = {
#endif
#endif
-int I830EntityIndex = -1;
+static int I830EntityIndex = -1;
#ifdef XFree86LOADER
@@ -402,7 +402,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)
@@ -470,7 +470,7 @@ I810FreeRec(ScrnInfoPtr pScrn)
if (!pScrn->driverPrivate)
return;
xfree(pScrn->driverPrivate);
- pScrn->driverPrivate = 0;
+ pScrn->driverPrivate = NULL;
}
#endif
@@ -579,7 +579,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]);
@@ -612,23 +613,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);
@@ -749,7 +750,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;
@@ -1225,7 +1226,7 @@ I810UnmapMMIO(ScrnInfoPtr pScrn)
xf86UnMapVidMem(pScrn->scrnIndex, (pointer) pI810->MMIOBase,
I810_REG_SIZE);
- pI810->MMIOBase = 0;
+ pI810->MMIOBase = NULL;
}
static Bool
@@ -1235,7 +1236,7 @@ I810UnmapMem(ScrnInfoPtr pScrn)
xf86UnMapVidMem(pScrn->scrnIndex, (pointer) pI810->FbBase,
pI810->FbMapSize);
- pI810->FbBase = 0;
+ pI810->FbBase = NULL;
I810UnmapMMIO(pScrn);
return TRUE;
}