summaryrefslogtreecommitdiff
path: root/xserver/hw/xfree86/exa/examodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'xserver/hw/xfree86/exa/examodule.c')
-rw-r--r--xserver/hw/xfree86/exa/examodule.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/xserver/hw/xfree86/exa/examodule.c b/xserver/hw/xfree86/exa/examodule.c
index 72cf7988d..4e809ea37 100644
--- a/xserver/hw/xfree86/exa/examodule.c
+++ b/xserver/hw/xfree86/exa/examodule.c
@@ -38,7 +38,7 @@
typedef struct _ExaXorgScreenPrivRec {
CloseScreenProcPtr SavedCloseScreen;
- EnableDisableFBAccessProcPtr SavedEnableDisableFBAccess;
+ xf86EnableDisableFBAccessProc *SavedEnableDisableFBAccess;
OptionInfoPtr options;
} ExaXorgScreenPrivRec, *ExaXorgScreenPrivPtr;
@@ -70,9 +70,9 @@ static const OptionInfoRec EXAOptions[] = {
};
static Bool
-exaXorgCloseScreen(int i, ScreenPtr pScreen)
+exaXorgCloseScreen(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen);
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
ExaXorgScreenPrivPtr pScreenPriv = (ExaXorgScreenPrivPtr)
dixLookupPrivate(&pScreen->devPrivates, exaXorgScreenPrivateKey);
@@ -83,24 +83,24 @@ exaXorgCloseScreen(int i, ScreenPtr pScreen)
free(pScreenPriv->options);
free(pScreenPriv);
- return pScreen->CloseScreen(i, pScreen);
+ return pScreen->CloseScreen(pScreen);
}
static void
-exaXorgEnableDisableFBAccess(int index, Bool enable)
+exaXorgEnableDisableFBAccess(ScrnInfoPtr pScrn, Bool enable)
{
- ScreenPtr pScreen = screenInfo.screens[index];
+ ScreenPtr pScreen = xf86ScrnToScreen(pScrn);
ExaXorgScreenPrivPtr pScreenPriv = (ExaXorgScreenPrivPtr)
dixLookupPrivate(&pScreen->devPrivates, exaXorgScreenPrivateKey);
if (!enable)
- exaEnableDisableFBAccess(index, enable);
+ exaEnableDisableFBAccess(pScreen, enable);
if (pScreenPriv->SavedEnableDisableFBAccess)
- pScreenPriv->SavedEnableDisableFBAccess(index, enable);
+ pScreenPriv->SavedEnableDisableFBAccess(pScrn, enable);
if (enable)
- exaEnableDisableFBAccess(index, enable);
+ exaEnableDisableFBAccess(pScreen, enable);
}
/**
@@ -111,8 +111,7 @@ void
exaDDXDriverInit(ScreenPtr pScreen)
{
ExaScreenPriv(pScreen);
- /* Do NOT use XF86SCRNINFO macro here!! */
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
ExaXorgScreenPrivPtr pScreenPriv;
if (!dixRegisterPrivateKey(&exaXorgScreenPrivateKeyRec, PRIVATE_SCREEN, 0))