/*------------------------------------------------------------------------- * NscSetup. * * Description :This function sets up the driver in X list and load the * module symbols through xf86loader routines.. * * Parameters. * Module :Pointer to the geode module * options :Driver module options. * ErrorMajor:Major no * ErrorMinor:Minor no. * * Returns :NULL on success * * Comments :Module setup is done by this function * *------------------------------------------------------------------------- */ static pointer NscSetup(pointer Module, pointer Options, int *ErrorMajor, int *ErrorMinor) { static Bool Initialised = FALSE; if (!Initialised) { Initialised = TRUE; xf86AddDriver(&NSC, Module, 0); /* Tell the loader about symbols from other modules that this * module might refer to. */ LoaderRefSymLists(nscVgahwSymbols, nscVbeSymbols, #if CFB nscCfbSymbols, #else nscFbSymbols, #endif nscXaaSymbols, nscInt10Symbols, nscRamdacSymbols, nscShadowSymbols, NULL); return (pointer) TRUE; } /*The return value must be non-NULL on success */ if (ErrorMajor) *ErrorMajor = LDR_ONCEONLY; return NULL; }
static pointer lgSetup(pointer module, pointer opts, int *errmaj, int *errmin) { static Bool setupDone = FALSE; if (!setupDone) { setupDone = TRUE; LoaderRefSymLists(vgahwSymbols, fbSymbols, xaaSymbols, ramdacSymbols, ddcSymbols, i2cSymbols, int10Symbols, NULL); } return (pointer)1; }
static pointer cirSetup(pointer module, pointer opts, int *errmaj, int *errmin) { static Bool setupDone = FALSE; /* This module should be loaded only once, but check to be sure. */ if (!setupDone) { setupDone = TRUE; xf86AddDriver(&CIRRUS, module, 0); LoaderRefSymLists(alpSymbols, lgSymbols, vbeSymbols, NULL); return (pointer)1; } if (errmaj) *errmaj = LDR_ONCEONLY; return NULL; }
static pointer vbeSetup(pointer module, pointer opts, int *errmaj, int *errmin) { static Bool setupDone = FALSE; if (!setupDone) { setupDone = TRUE; LoaderRefSymLists(vbe_ddcSymbols,NULL); /* * Tell the loader about symbols from other modules that this module * might refer to. */ } /* * The return value must be non-NULL on success even though there * is no TearDownProc. */ return (pointer)1; }
static pointer ddcSetup(pointer module, pointer opts, int *errmaj, int *errmin) { static Bool setupDone = FALSE; if (!setupDone) { setupDone = TRUE; #ifndef REMOVE_LOADER_CHECK_MODULE_INFO if (xf86LoaderCheckSymbol("xf86AddModuleInfo")) #endif xf86AddModuleInfo(&DDC, module); /* * Tell the loader about symbols from other modules that this module * might refer to. */ LoaderRefSymLists(i2cSymbols, NULL); } /* * The return value must be non-NULL on success even though there * is no TearDownProc. */ return (pointer)1; }