diff options
author | Eamon Walsh <ewalsh@tycho.nsa.gov> | 2007-08-28 09:28:25 -0400 |
---|---|---|
committer | Eamon Walsh <ewalsh@moss-charon.epoch.ncsc.mil> | 2007-08-28 09:28:25 -0400 |
commit | 4017d3190234e189a0bbd33193a148d4d3c7556b (patch) | |
tree | 2ab228113d410386afde50c893f137d95974b8f3 /hw/xfree86/exa | |
parent | 85547073265ae9bc4ae3af920a6d3214fd1ca0c5 (diff) |
devPrivates rework: since API is already broken, switch everything
over to new system.
Need to update documentation and address some remaining vestiges of
old system such as CursorRec structure, fb "offman" structure, and
FontRec privates.
Diffstat (limited to 'hw/xfree86/exa')
-rw-r--r-- | hw/xfree86/exa/examodule.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/hw/xfree86/exa/examodule.c b/hw/xfree86/exa/examodule.c index 4dce58fd8..aac32949c 100644 --- a/hw/xfree86/exa/examodule.c +++ b/hw/xfree86/exa/examodule.c @@ -42,8 +42,7 @@ typedef struct _ExaXorgScreenPrivRec { OptionInfoPtr options; } ExaXorgScreenPrivRec, *ExaXorgScreenPrivPtr; -static int exaXorgServerGeneration; -static int exaXorgScreenPrivateIndex; +static DevPrivateKey exaXorgScreenPrivateKey = &exaXorgScreenPrivateKey; typedef enum { EXAOPT_MIGRATION_HEURISTIC, @@ -69,8 +68,8 @@ static Bool exaXorgCloseScreen (int i, ScreenPtr pScreen) { ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen); - ExaXorgScreenPrivPtr pScreenPriv = - pScreen->devPrivates[exaXorgScreenPrivateIndex].ptr; + ExaXorgScreenPrivPtr pScreenPriv = (ExaXorgScreenPrivPtr) + dixLookupPrivate(&pScreen->devPrivates, exaXorgScreenPrivateKey); pScreen->CloseScreen = pScreenPriv->SavedCloseScreen; @@ -86,8 +85,8 @@ static void exaXorgEnableDisableFBAccess (int index, Bool enable) { ScreenPtr pScreen = screenInfo.screens[index]; - ExaXorgScreenPrivPtr pScreenPriv = - pScreen->devPrivates[exaXorgScreenPrivateIndex].ptr; + ExaXorgScreenPrivPtr pScreenPriv = (ExaXorgScreenPrivPtr) + dixLookupPrivate(&pScreen->devPrivates, exaXorgScreenPrivateKey); if (!enable) exaEnableDisableFBAccess (index, enable); @@ -111,11 +110,6 @@ exaDDXDriverInit(ScreenPtr pScreen) ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; ExaXorgScreenPrivPtr pScreenPriv; - if (exaXorgServerGeneration != serverGeneration) { - exaXorgScreenPrivateIndex = AllocateScreenPrivateIndex(); - exaXorgServerGeneration = serverGeneration; - } - pScreenPriv = xcalloc (1, sizeof(ExaXorgScreenPrivRec)); if (pScreenPriv == NULL) return; @@ -166,7 +160,7 @@ exaDDXDriverInit(ScreenPtr pScreen) pExaScr->info->DownloadFromScreen = NULL; } - pScreen->devPrivates[exaXorgScreenPrivateIndex].ptr = pScreenPriv; + dixSetPrivate(&pScreen->devPrivates, exaXorgScreenPrivateKey, pScreenPriv); pScreenPriv->SavedEnableDisableFBAccess = pScrn->EnableDisableFBAccess; pScrn->EnableDisableFBAccess = exaXorgEnableDisableFBAccess; |