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:
parent
341f3bccaf
commit
6e898ef080
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue