diff --git a/hw/xfree86/common/xf86Module.h b/hw/xfree86/common/xf86Module.h index 2f314db6dc..1696e551c2 100644 --- a/hw/xfree86/common/xf86Module.h +++ b/hw/xfree86/common/xf86Module.h @@ -171,9 +171,17 @@ typedef void (*ModuleTearDownProc) (void *); #define MODULESETUPPROTO(func) void *func(void *, void *, int*, int*) +/* + * Module information header. Every loadable module needs to export a symbol + * of that type, so the loader can call into the module for initialization. + * The symbol must be named + "ModuleData". + */ typedef struct { + /* must point to structure with version information */ XF86ModuleVersionInfo *vers; + /* called on module load (if not null) */ ModuleSetupProc setup; + /* called on module teardown with setup()'s result as parameter (if not null) */ ModuleTearDownProc teardown; } XF86ModuleData;