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>
This commit is contained in:
Olivier Fourdan 2016-02-05 09:48:16 +01:00 committed by Adam Jackson
parent 341f3bccaf
commit 6e898ef080
2 changed files with 0 additions and 18 deletions

View File

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

View File

@ -49,7 +49,6 @@
static DevPrivateKeyRec VidModeKeyRec; static DevPrivateKeyRec VidModeKeyRec;
#define VidModeKey (&VidModeKeyRec) #define VidModeKey (&VidModeKeyRec)
static Bool VidModeClose(ScreenPtr pScreen);
#define VMPTR(p) ((VidModePtr)dixLookupPrivate(&(p)->devPrivates, VidModeKey)) #define VMPTR(p) ((VidModePtr)dixLookupPrivate(&(p)->devPrivates, VidModeKey))
@ -73,8 +72,6 @@ VidModeExtensionInit(ScreenPtr pScreen)
pVidMode->Flags = 0; pVidMode->Flags = 0;
pVidMode->Next = NULL; pVidMode->Next = NULL;
pVidMode->CloseScreen = pScreen->CloseScreen;
pScreen->CloseScreen = VidModeClose;
return TRUE; return TRUE;
#else #else
@ -85,20 +82,6 @@ VidModeExtensionInit(ScreenPtr pScreen)
#ifdef XF86VIDMODE #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 static Bool
VidModeAvailable(int scrnIndex) VidModeAvailable(int scrnIndex)
{ {