summaryrefslogtreecommitdiff
path: root/hw/xfree86/ramdac/xf86RamDac.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xfree86/ramdac/xf86RamDac.c')
-rw-r--r--hw/xfree86/ramdac/xf86RamDac.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/hw/xfree86/ramdac/xf86RamDac.c b/hw/xfree86/ramdac/xf86RamDac.c
index 24806b689..a67164917 100644
--- a/hw/xfree86/ramdac/xf86RamDac.c
+++ b/hw/xfree86/ramdac/xf86RamDac.c
@@ -77,9 +77,9 @@ RamDacInit(ScrnInfoPtr pScrn, RamDacRecPtr ramdacPriv)
* make sure the RamDacRec is allocated
*/
if (!RamDacGetRec(pScrn))
- return FALSE;
+ return FALSE;
ramdacScrPtr =
- ((RamDacScreenRecPtr) (pScrn)->privates[RamDacGetScreenIndex()].ptr);
+ ((RamDacScreenRecPtr) (pScrn)->privates[RamDacGetScreenIndex()].ptr);
ramdacScrPtr->RamDacRec = ramdacPriv;
return TRUE;
@@ -89,9 +89,9 @@ void
RamDacGetRecPrivate(void)
{
if (RamDacHWPrivateIndex < 0)
- RamDacHWPrivateIndex = xf86AllocateScrnInfoPrivateIndex();
+ RamDacHWPrivateIndex = xf86AllocateScrnInfoPrivateIndex();
if (RamDacScreenPrivateIndex < 0)
- RamDacScreenPrivateIndex = xf86AllocateScrnInfoPrivateIndex();
+ RamDacScreenPrivateIndex = xf86AllocateScrnInfoPrivateIndex();
return;
}
@@ -104,15 +104,15 @@ RamDacGetRec(ScrnInfoPtr scrp)
* has already been done.
*/
if (scrp->privates[RamDacHWPrivateIndex].ptr != NULL)
- return TRUE;
+ return TRUE;
if (scrp->privates[RamDacScreenPrivateIndex].ptr != NULL)
- return TRUE;
+ return TRUE;
+
+ scrp->privates[RamDacHWPrivateIndex].ptr =
+ xnfcalloc(sizeof(RamDacHWRec), 1);
+ scrp->privates[RamDacScreenPrivateIndex].ptr =
+ xnfcalloc(sizeof(RamDacScreenRec), 1);
- scrp->privates[RamDacHWPrivateIndex].ptr =
- xnfcalloc(sizeof(RamDacHWRec), 1);
- scrp->privates[RamDacScreenPrivateIndex].ptr =
- xnfcalloc(sizeof(RamDacScreenRec), 1);
-
return TRUE;
}
@@ -123,15 +123,15 @@ RamDacFreeRec(ScrnInfoPtr pScrn)
RamDacScreenRecPtr ramdacScrPtr;
if (RamDacHWPrivateIndex < 0)
- return;
+ return;
if (RamDacScreenPrivateIndex < 0)
- return;
+ return;
ramdacHWPtr = RAMDACHWPTR(pScrn);
ramdacScrPtr = ((RamDacScreenRecPtr)
- (pScrn)->privates[RamDacGetScreenIndex()].ptr);
-
+ (pScrn)->privates[RamDacGetScreenIndex()].ptr);
+
free(ramdacHWPtr);
ramdacHWPtr = NULL;