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 <ajax@redhat.com>
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
(cherry picked from commit 6e898ef080)
This commit is contained in:
Olivier Fourdan 2016-02-05 09:48:16 +01:00 committed by Adam Jackson
parent cb3a8768db
commit 2028b9066d
2 changed files with 0 additions and 18 deletions

View file

@ -121,7 +121,6 @@ typedef struct {
DisplayModePtr First;
DisplayModePtr Next;
int Flags;
CloseScreenProcPtr CloseScreen;
} VidModeRec, *VidModePtr;
#endif

View file

@ -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)
{