Remove unused setupFunc from extensions

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@fooishbar.org>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Daniel Stone 2012-07-10 02:03:28 +01:00 committed by Keith Packard
parent 710318e803
commit a15dac5509
5 changed files with 30 additions and 43 deletions

View File

@ -58,32 +58,28 @@ static ExtensionModule extensionModules[] = {
{ {
XFree86VidModeExtensionInit, XFree86VidModeExtensionInit,
XF86VIDMODENAME, XF86VIDMODENAME,
&noXFree86VidModeExtension, &noXFree86VidModeExtension
NULL
}, },
#endif #endif
#ifdef XFreeXDGA #ifdef XFreeXDGA
{ {
XFree86DGAExtensionInit, XFree86DGAExtensionInit,
XF86DGANAME, XF86DGANAME,
&noXFree86DGAExtension, &noXFree86DGAExtension
NULL
}, },
#endif #endif
#ifdef XF86DRI #ifdef XF86DRI
{ {
XFree86DRIExtensionInit, XFree86DRIExtensionInit,
"XFree86-DRI", "XFree86-DRI",
&noXFree86DRIExtension, &noXFree86DRIExtension
NULL
}, },
#endif #endif
#ifdef DRI2 #ifdef DRI2
{ {
DRI2ExtensionInit, DRI2ExtensionInit,
DRI2_NAME, DRI2_NAME,
&noDRI2Extension, &noDRI2Extension
NULL
} }
#endif #endif
}; };

View File

@ -49,8 +49,7 @@ static MODULESETUPPROTO(glxSetup);
static ExtensionModule GLXExt = { static ExtensionModule GLXExt = {
GlxExtensionInit, GlxExtensionInit,
"GLX", "GLX",
&noGlxExtension, &noGlxExtension
NULL
}; };
static XF86ModuleVersionInfo VersRec = { static XF86ModuleVersionInfo VersRec = {

View File

@ -5973,7 +5973,6 @@ typedef struct {
InitExtension initFunc; InitExtension initFunc;
char * name; char * name;
Bool *disablePtr; Bool *disablePtr;
InitExtension setupFunc;
} ExtensionModule; } ExtensionModule;
</programlisting> </programlisting>
</para> </para>

View File

@ -84,7 +84,6 @@ typedef struct {
InitExtension initFunc; InitExtension initFunc;
const char *name; const char *name;
Bool *disablePtr; Bool *disablePtr;
InitExtension setupFunc;
} ExtensionModule; } ExtensionModule;
extern _X_EXPORT unsigned short StandardMinorOpcode(ClientPtr /*client */ ); extern _X_EXPORT unsigned short StandardMinorOpcode(ClientPtr /*client */ );

View File

@ -235,65 +235,63 @@ EnableDisableExtensionError(const char *name, Bool enable)
/* List of built-in (statically linked) extensions */ /* List of built-in (statically linked) extensions */
static ExtensionModule staticExtensions[] = { static ExtensionModule staticExtensions[] = {
{GEExtensionInit, "Generic Event Extension", &noGEExtension, NULL}, {GEExtensionInit, "Generic Event Extension", &noGEExtension},
{ShapeExtensionInit, "SHAPE", NULL, NULL}, {ShapeExtensionInit, "SHAPE", NULL},
#ifdef MITSHM #ifdef MITSHM
{ShmExtensionInit, SHMNAME, &noMITShmExtension, NULL}, {ShmExtensionInit, SHMNAME, &noMITShmExtension},
#endif #endif
{XInputExtensionInit, "XInputExtension", NULL, NULL}, {XInputExtensionInit, "XInputExtension", NULL},
#ifdef XTEST #ifdef XTEST
{XTestExtensionInit, XTestExtensionName, &noTestExtensions, NULL}, {XTestExtensionInit, XTestExtensionName, &noTestExtensions},
#endif #endif
{BigReqExtensionInit, "BIG-REQUESTS", NULL, NULL}, {BigReqExtensionInit, "BIG-REQUESTS", NULL},
{SyncExtensionInit, "SYNC", NULL, NULL}, {SyncExtensionInit, "SYNC", NULL},
{XkbExtensionInit, XkbName, NULL, NULL}, {XkbExtensionInit, XkbName, NULL},
{XCMiscExtensionInit, "XC-MISC", NULL, NULL}, {XCMiscExtensionInit, "XC-MISC", NULL},
#ifdef XCSECURITY #ifdef XCSECURITY
{SecurityExtensionInit, SECURITY_EXTENSION_NAME, &noSecurityExtension, NULL}, {SecurityExtensionInit, SECURITY_EXTENSION_NAME, &noSecurityExtension},
#endif #endif
#ifdef PANORAMIX #ifdef PANORAMIX
{PanoramiXExtensionInit, PANORAMIX_PROTOCOL_NAME, &noPanoramiXExtension, {PanoramiXExtensionInit, PANORAMIX_PROTOCOL_NAME, &noPanoramiXExtension},
NULL},
#endif #endif
#ifdef XFIXES #ifdef XFIXES
/* must be before Render to layer DisplayCursor correctly */ /* must be before Render to layer DisplayCursor correctly */
{XFixesExtensionInit, "XFIXES", &noXFixesExtension, NULL}, {XFixesExtensionInit, "XFIXES", &noXFixesExtension},
#endif #endif
#ifdef XF86BIGFONT #ifdef XF86BIGFONT
{XFree86BigfontExtensionInit, XF86BIGFONTNAME, &noXFree86BigfontExtension, {XFree86BigfontExtensionInit, XF86BIGFONTNAME, &noXFree86BigfontExtension},
NULL},
#endif #endif
{RenderExtensionInit, "RENDER", &noRenderExtension, NULL}, {RenderExtensionInit, "RENDER", &noRenderExtension},
#ifdef RANDR #ifdef RANDR
{RRExtensionInit, "RANDR", &noRRExtension, NULL}, {RRExtensionInit, "RANDR", &noRRExtension},
#endif #endif
#ifdef COMPOSITE #ifdef COMPOSITE
{CompositeExtensionInit, "COMPOSITE", &noCompositeExtension, NULL}, {CompositeExtensionInit, "COMPOSITE", &noCompositeExtension},
#endif #endif
#ifdef DAMAGE #ifdef DAMAGE
{DamageExtensionInit, "DAMAGE", &noDamageExtension, NULL}, {DamageExtensionInit, "DAMAGE", &noDamageExtension},
#endif #endif
#ifdef SCREENSAVER #ifdef SCREENSAVER
{ScreenSaverExtensionInit, ScreenSaverName, &noScreenSaverExtension, NULL}, {ScreenSaverExtensionInit, ScreenSaverName, &noScreenSaverExtension},
#endif #endif
#ifdef DBE #ifdef DBE
{DbeExtensionInit, "DOUBLE-BUFFER", &noDbeExtension, NULL}, {DbeExtensionInit, "DOUBLE-BUFFER", &noDbeExtension},
#endif #endif
#ifdef XRECORD #ifdef XRECORD
{RecordExtensionInit, "RECORD", &noTestExtensions, NULL}, {RecordExtensionInit, "RECORD", &noTestExtensions},
#endif #endif
#ifdef DPMSExtension #ifdef DPMSExtension
{DPMSExtensionInit, DPMSExtensionName, &noDPMSExtension, NULL}, {DPMSExtensionInit, DPMSExtensionName, &noDPMSExtension},
#endif #endif
#ifdef RES #ifdef RES
{ResExtensionInit, XRES_NAME, &noResExtension, NULL}, {ResExtensionInit, XRES_NAME, &noResExtension},
#endif #endif
#ifdef XV #ifdef XV
{XvExtensionInit, XvName, &noXvExtension, NULL}, {XvExtensionInit, XvName, &noXvExtension},
{XvMCExtensionInit, XvMCName, &noXvExtension, NULL}, {XvMCExtensionInit, XvMCName, &noXvExtension},
#endif #endif
#ifdef XSELINUX #ifdef XSELINUX
{SELinuxExtensionInit, SELINUX_EXTENSION_NAME, &noSELinuxExtension, NULL}, {SELinuxExtensionInit, SELINUX_EXTENSION_NAME, &noSELinuxExtension},
#endif #endif
}; };
@ -379,8 +377,4 @@ LoadExtension(ExtensionModule * e, Bool builtin)
newext->name = e->name; newext->name = e->name;
newext->initFunc = e->initFunc; newext->initFunc = e->initFunc;
newext->disablePtr = e->disablePtr; newext->disablePtr = e->disablePtr;
newext->setupFunc = e->setupFunc;
if (e->setupFunc != NULL)
e->setupFunc();
} }