From 6e898ef080df93e885ead9d6fee8854b34e0216f Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Fri, 5 Feb 2016 09:48:16 +0100 Subject: [PATCH] vidmode: get rid of the CloseScreen wrapper As we rely on dixRegisterPrivateKey() to allocate the memory for us that will be free automatically, we do not need the CloseScreen wrapper anymore. Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan --- 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 2eefeaf83..f2b8e8a6c 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 b25fe26d5..04637f183 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 @@ -85,20 +82,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) {