[PATCH 32/37] Remove unused setupFunc from extensions

Daniel Stone daniel at fooishbar.org
Tue Jun 28 12:27:48 PDT 2011


setupFunc was used as an early callback for half-modular extensions such
as Xv, XvMC and DGA to set up hooks between the core server and the
modular component.  Now we've rid ourselves of that, we can also bin
setupFunc.

Signed-off-by: Daniel Stone <daniel at fooishbar.org>
---
 hw/xfree86/common/xf86Extensions.c |   12 ++-----
 hw/xfree86/dixmods/glxmodule.c     |    3 +-
 hw/xfree86/doc/ddxDesign.xml       |    1 -
 include/extension.h                |    1 -
 mi/miinitext.c                     |   56 ++++++++++++++++-------------------
 5 files changed, 31 insertions(+), 42 deletions(-)

diff --git a/hw/xfree86/common/xf86Extensions.c b/hw/xfree86/common/xf86Extensions.c
index 200dd0e..5360d14 100644
--- a/hw/xfree86/common/xf86Extensions.c
+++ b/hw/xfree86/common/xf86Extensions.c
@@ -57,32 +57,28 @@ static ExtensionModule extensionModules[] = {
     {
 	XFree86VidModeExtensionInit,
 	XF86VIDMODENAME,
-	&noXFree86VidModeExtension,
-	NULL
+	&noXFree86VidModeExtension
     },
 #endif
 #ifdef XFreeXDGA
     {
 	XFree86DGAExtensionInit,
 	XF86DGANAME,
-	&noXFree86DGAExtension,
-	NULL
+	&noXFree86DGAExtension
     },
 #endif
 #ifdef XF86DRI
     {
         XFree86DRIExtensionInit,
         "XFree86-DRI",
-        &noXFree86DRIExtension,
-        NULL
+        &noXFree86DRIExtension
     },
 #endif
 #ifdef DRI2
     {
         DRI2ExtensionInit,
         DRI2_NAME,
-        &noDRI2Extension,
-        NULL
+        &noDRI2Extension
     }
 #endif
 };
diff --git a/hw/xfree86/dixmods/glxmodule.c b/hw/xfree86/dixmods/glxmodule.c
index 6bc3788..60c5777 100644
--- a/hw/xfree86/dixmods/glxmodule.c
+++ b/hw/xfree86/dixmods/glxmodule.c
@@ -49,8 +49,7 @@ static ExtensionModule GLXExt =
 {
     GlxExtensionInit,
     "GLX",
-    &noGlxExtension,
-    NULL
+    &noGlxExtension
 };
 
 static XF86ModuleVersionInfo VersRec =
diff --git a/hw/xfree86/doc/ddxDesign.xml b/hw/xfree86/doc/ddxDesign.xml
index 87666b1..6687420 100644
--- a/hw/xfree86/doc/ddxDesign.xml
+++ b/hw/xfree86/doc/ddxDesign.xml
@@ -5985,7 +5985,6 @@ typedef struct {
     InitExtension       initFunc;
     char *              name;
     Bool                *disablePtr;
-    InitExtension       setupFunc;
 } ExtensionModule;
 	      </programlisting>
 	    </para>
diff --git a/include/extension.h b/include/extension.h
index cca00bc..8d9a3bc 100644
--- a/include/extension.h
+++ b/include/extension.h
@@ -85,7 +85,6 @@ typedef struct {
     InitExtension	initFunc;
     const char *	name;
     Bool		*disablePtr;
-    InitExtension	setupFunc;	
 } ExtensionModule;
 
 extern _X_EXPORT unsigned short StandardMinorOpcode(ClientPtr /*client*/);
diff --git a/mi/miinitext.c b/mi/miinitext.c
index 6caaa50..a59724b 100644
--- a/mi/miinitext.c
+++ b/mi/miinitext.c
@@ -394,65 +394,65 @@ void EnableDisableExtensionError(char *name, Bool enable)
 
 /* List of built-in (statically linked) extensions */
 static ExtensionModule staticExtensions[] = {
-    { GEExtensionInit, "Generic Event Extension", &noGEExtension, NULL },
-    { ShapeExtensionInit, "SHAPE", NULL, NULL },
+    { GEExtensionInit, "Generic Event Extension", &noGEExtension },
+    { ShapeExtensionInit, "SHAPE", NULL },
 #ifdef MITSHM
-    { ShmExtensionInit, SHMNAME, &noMITShmExtension, NULL },
+    { ShmExtensionInit, SHMNAME, &noMITShmExtension },
 #endif
-    { XInputExtensionInit, "XInputExtension", NULL, NULL },
+    { XInputExtensionInit, "XInputExtension", NULL },
 #ifdef XTEST
-    { XTestExtensionInit, XTestExtensionName, &noTestExtensions, NULL },
+    { XTestExtensionInit, XTestExtensionName, &noTestExtensions },
 #endif
-    { BigReqExtensionInit, "BIG-REQUESTS", NULL, NULL },
-    { SyncExtensionInit, "SYNC", NULL, NULL },
-    { XkbExtensionInit, XkbName, NULL, NULL },
-    { XCMiscExtensionInit, "XC-MISC", NULL, NULL },
+    { BigReqExtensionInit, "BIG-REQUESTS", NULL },
+    { SyncExtensionInit, "SYNC", NULL },
+    { XkbExtensionInit, XkbName, NULL },
+    { XCMiscExtensionInit, "XC-MISC", NULL },
 #ifdef XCSECURITY
-    { SecurityExtensionInit, SECURITY_EXTENSION_NAME, &noSecurityExtension, NULL },
+    { SecurityExtensionInit, SECURITY_EXTENSION_NAME, &noSecurityExtension },
 #endif
 #ifdef PANORAMIX
-    { PanoramiXExtensionInit, PANORAMIX_PROTOCOL_NAME, &noPanoramiXExtension, NULL },
+    { PanoramiXExtensionInit, PANORAMIX_PROTOCOL_NAME, &noPanoramiXExtension },
 #endif
 #ifdef XFIXES
     /* must be before Render to layer DisplayCursor correctly */
-    { XFixesExtensionInit, "XFIXES", &noXFixesExtension, NULL },
+    { XFixesExtensionInit, "XFIXES", &noXFixesExtension },
 #endif
 #ifdef XF86BIGFONT
-    { XFree86BigfontExtensionInit, XF86BIGFONTNAME, &noXFree86BigfontExtension, NULL },
+    { XFree86BigfontExtensionInit, XF86BIGFONTNAME, &noXFree86BigfontExtension },
 #endif
-    { RenderExtensionInit, "RENDER", &noRenderExtension, NULL },
+    { RenderExtensionInit, "RENDER", &noRenderExtension },
 #ifdef RANDR
-    { RRExtensionInit, "RANDR", &noRRExtension, NULL },
+    { RRExtensionInit, "RANDR", &noRRExtension },
 #endif
 #ifdef COMPOSITE
-    { CompositeExtensionInit, "COMPOSITE", &noCompositeExtension, NULL },
+    { CompositeExtensionInit, "COMPOSITE", &noCompositeExtension },
 #endif
 #ifdef DAMAGE
-    { DamageExtensionInit, "DAMAGE", &noDamageExtension, NULL },
+    { DamageExtensionInit, "DAMAGE", &noDamageExtension },
 #endif
 #ifdef SCREENSAVER
-    { ScreenSaverExtensionInit, ScreenSaverName, &noScreenSaverExtension, NULL },
+    { ScreenSaverExtensionInit, ScreenSaverName, &noScreenSaverExtension },
 #endif
 #ifdef DBE
-    { DbeExtensionInit, "DOUBLE-BUFFER", &noDbeExtension, NULL },
+    { DbeExtensionInit, "DOUBLE-BUFFER", &noDbeExtension },
 #endif
 #ifdef XRECORD
-    { RecordExtensionInit, "RECORD", &noTestExtensions, NULL },
+    { RecordExtensionInit, "RECORD", &noTestExtensions },
 #endif
 #ifdef DPMSExtension
-    { DPMSExtensionInit, DPMSExtensionName, &noDPMSExtension, NULL },
+    { DPMSExtensionInit, DPMSExtensionName, &noDPMSExtension },
 #endif
 #ifdef RES
-    { ResExtensionInit, XRES_NAME, &noResExtension, NULL },
+    { ResExtensionInit, XRES_NAME, &noResExtension },
 #endif
 #ifdef XV
-    { XvExtensionInit, XvName, &noXvExtension, NULL },
-    { XvMCExtensionInit, XvMCName, &noXvExtension, NULL },
+    { XvExtensionInit, XvName, &noXvExtension },
+    { XvMCExtensionInit, XvMCName, &noXvExtension },
 #endif
 #ifdef XSELINUX
-    { SELinuxExtensionInit, SELINUX_EXTENSION_NAME, &noSELinuxExtension, NULL },
+    { SELinuxExtensionInit, SELINUX_EXTENSION_NAME, &noSELinuxExtension },
 #endif
-    { NULL, NULL, NULL, NULL }
+    { NULL, NULL, NULL }
 };
 
 static ExtensionModule *ExtensionModuleList = NULL;
@@ -524,8 +524,4 @@ LoadExtension(ExtensionModule * e, Bool builtin)
     newext->name = e->name;
     newext->initFunc = e->initFunc;
     newext->disablePtr = e->disablePtr;
-    newext->setupFunc = e->setupFunc;
-
-    if (e->setupFunc != NULL)
-	e->setupFunc();
 }
-- 
1.7.5.4



More information about the xorg-devel mailing list