[PATCH 02/12] vidmode: get rid of the CloseScreen wrapper

Olivier Fourdan ofourdan at redhat.com
Fri Feb 5 08:48:16 UTC 2016


As we rely on dixRegisterPrivateKey() to allocate the memory for us that
will be free automatically, we do not need the CloseScreen wrapper
anymore.

Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>
---
 hw/xfree86/common/xf86Privstr.h |  1 -
 hw/xfree86/common/xf86VidMode.c | 17 -----------------
 2 files changed, 18 deletions(-)

diff --git a/hw/xfree86/common/xf86Privstr.h b/hw/xfree86/common/xf86Privstr.h
index 2eefeaf..f2b8e8a 100644
--- a/hw/xfree86/common/xf86Privstr.h
+++ b/hw/xfree86/common/xf86Privstr.h
@@ -121,7 +121,6 @@ typedef struct {
     DisplayModePtr First;
     DisplayModePtr Next;
     int Flags;
-    CloseScreenProcPtr CloseScreen;
 } VidModeRec, *VidModePtr;
 #endif
 
diff --git a/hw/xfree86/common/xf86VidMode.c b/hw/xfree86/common/xf86VidMode.c
index b25fe26..04637f1 100644
--- a/hw/xfree86/common/xf86VidMode.c
+++ b/hw/xfree86/common/xf86VidMode.c
@@ -49,7 +49,6 @@
 
 static DevPrivateKeyRec VidModeKeyRec;
 #define VidModeKey (&VidModeKeyRec)
-static Bool VidModeClose(ScreenPtr pScreen);
 
 #define VMPTR(p) ((VidModePtr)dixLookupPrivate(&(p)->devPrivates, VidModeKey))
 
@@ -73,8 +72,6 @@ VidModeExtensionInit(ScreenPtr pScreen)
 
     pVidMode->Flags = 0;
     pVidMode->Next = NULL;
-    pVidMode->CloseScreen = pScreen->CloseScreen;
-    pScreen->CloseScreen = VidModeClose;
 
     return TRUE;
 #else
@@ -86,20 +83,6 @@ VidModeExtensionInit(ScreenPtr pScreen)
 #ifdef XF86VIDMODE
 
 static Bool
-VidModeClose(ScreenPtr pScreen)
-{
-    VidModePtr pVidMode = VMPTR(pScreen);
-
-    /* This shouldn't happen */
-    if (!pVidMode)
-        return FALSE;
-
-    pScreen->CloseScreen = pVidMode->CloseScreen;
-
-    return pScreen->CloseScreen(pScreen);
-}
-
-static Bool
 VidModeAvailable(int scrnIndex)
 {
     ScrnInfoPtr pScrn;
-- 
2.5.0



More information about the xorg-devel mailing list