[PATCH 06/15] xf86: modify FreeScreen callback to take pScrn instead of index. (ABI/API)

Dave Airlie airlied at gmail.com
Tue Apr 10 07:47:37 PDT 2012


Another index->pScrn conversion.

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 hw/xfree86/common/xf86Helper.c         |    2 +-
 hw/xfree86/common/xf86VGAarbiter.c     |    6 +++---
 hw/xfree86/common/xf86VGAarbiterPriv.h |    4 ++--
 hw/xfree86/common/xf86str.h            |    2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
index 2f78974..4925bcb 100644
--- a/hw/xfree86/common/xf86Helper.c
+++ b/hw/xfree86/common/xf86Helper.c
@@ -215,7 +215,7 @@ xf86DeleteScreen(int scrnIndex, int flags)
 
     /* If a FreeScreen function is defined, call it here */
     if (pScrn->FreeScreen != NULL)
-        pScrn->FreeScreen(scrnIndex, 0);
+        pScrn->FreeScreen(pScrn, 0);
 
     while (pScrn->modes)
         xf86DeleteMode(&pScrn->modes, pScrn->modes);
diff --git a/hw/xfree86/common/xf86VGAarbiter.c b/hw/xfree86/common/xf86VGAarbiter.c
index 24ee78a..546230b 100644
--- a/hw/xfree86/common/xf86VGAarbiter.c
+++ b/hw/xfree86/common/xf86VGAarbiter.c
@@ -526,15 +526,15 @@ VGAarbiterLeaveVT(ScrnInfoPtr pScrn, int flags)
 }
 
 static void
-VGAarbiterFreeScreen(int index, int flags)
+VGAarbiterFreeScreen(ScrnInfoPtr pScrn, int flags)
 {
-    ScreenPtr pScreen = screenInfo.screens[index];
+    ScreenPtr pScreen = xf86ScrnToScreen(pScrn);
     VGAarbiterScreenPtr pScreenPriv =
         (VGAarbiterScreenPtr) dixLookupPrivate(&pScreen->devPrivates,
                                                VGAarbiterScreenKey);
 
     VGAGet(pScreen);
-    (*pScreenPriv->FreeScreen) (index, flags);
+    (*pScreenPriv->FreeScreen) (pScrn, flags);
     VGAPut();
 }
 
diff --git a/hw/xfree86/common/xf86VGAarbiterPriv.h b/hw/xfree86/common/xf86VGAarbiterPriv.h
index c27483e..d513156 100644
--- a/hw/xfree86/common/xf86VGAarbiterPriv.h
+++ b/hw/xfree86/common/xf86VGAarbiterPriv.h
@@ -129,7 +129,7 @@ typedef struct _VGAarbiterScreen {
     Bool (*SwitchMode) (int, DisplayModePtr, int);
     Bool (*EnterVT) (ScrnInfoPtr, int);
     void (*LeaveVT) (ScrnInfoPtr, int);
-    void (*FreeScreen) (int, int);
+    void (*FreeScreen) (ScrnInfoPtr, int);
     miPointerSpriteFuncPtr miSprite;
     CompositeProcPtr Composite;
     GlyphsProcPtr Glyphs;
@@ -180,7 +180,7 @@ static void VGAarbiterAdjustFrame(int index, int x, int y, int flags);
 static Bool VGAarbiterSwitchMode(int index, DisplayModePtr mode, int flags);
 static Bool VGAarbiterEnterVT(ScrnInfoPtr pScrn, int flags);
 static void VGAarbiterLeaveVT(ScrnInfoPtr pScrn, int flags);
-static void VGAarbiterFreeScreen(int index, int flags);
+static void VGAarbiterFreeScreen(ScrnInfoPtr pScrn, int flags);
 
 /* GC funcs */
 static void VGAarbiterValidateGC(GCPtr pGC, unsigned long changes,
diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h
index 0406ac7..797a6b7 100644
--- a/hw/xfree86/common/xf86str.h
+++ b/hw/xfree86/common/xf86str.h
@@ -635,7 +635,7 @@ typedef Bool xf86SwitchModeProc(int, DisplayModePtr, int);
 typedef void xf86AdjustFrameProc(int, int, int, int);
 typedef Bool xf86EnterVTProc(ScrnInfoPtr, int);
 typedef void xf86LeaveVTProc(ScrnInfoPtr, int);
-typedef void xf86FreeScreenProc(int, int);
+typedef void xf86FreeScreenProc(ScrnInfoPtr, int);
 typedef ModeStatus xf86ValidModeProc(int, DisplayModePtr, Bool, int);
 typedef void xf86EnableDisableFBAccessProc(int, Bool);
 typedef int xf86SetDGAModeProc(int, int, DGADevicePtr);
-- 
1.7.9.3



More information about the xorg-devel mailing list