From 2e58aa401dfbab438752038a9034df571c8f8bde Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 12 May 2006 15:54:37 -0700 Subject: [PATCH] Make the intel_acpi.c code non-modular and make it compile. I think we'll end up nuking this code anyway, as keithp (and I, as well) disagree about how ACPI should be handled, but the goal is to compile at the moment. --- src/i830_driver.c | 14 +------------ src/intel_acpi.c | 52 ++++++----------------------------------------- 2 files changed, 7 insertions(+), 59 deletions(-) diff --git a/src/i830_driver.c b/src/i830_driver.c index 8671e5ae..ca76a68c 100644 --- a/src/i830_driver.c +++ b/src/i830_driver.c @@ -2110,22 +2110,10 @@ I830BIOSPreInit(ScrnInfoPtr pScrn, int flags) if (pScrn->numEntities != 1) return FALSE; - if (!xf86LoadSubModule(pScrn, "intel_acpi")) - return FALSE; - /* try to load the video kernel module now */ xf86LoadKernelModule("video"); - if (xf86LoaderCheckSymbol("I830ACPIOpen")) { - void (*acpiOpen)(void) = NULL; - - acpiOpen = LoaderSymbol("I830ACPIOpen"); - - if (acpiOpen) { - ErrorF("Opening ACPI\n"); - (*acpiOpen)(); - } - } + I830ACPIOpen(); /* Load int10 module */ if (!xf86LoadSubModule(pScrn, "int10")) diff --git a/src/intel_acpi.c b/src/intel_acpi.c index e7014b28..1cd6c97b 100644 --- a/src/intel_acpi.c +++ b/src/intel_acpi.c @@ -1,3 +1,7 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #ifndef XFree86LOADER #include #include @@ -5,7 +9,8 @@ #endif #include #include -#include "X.h" +#include +#include #include "os.h" #include "xf86.h" #include "xf86Priv.h" @@ -184,48 +189,3 @@ I830CloseACPI(void) I830ACPIihPtr = NULL; } } - -#ifdef XFree86LOADER -static MODULESETUPPROTO(intel_acpiSetup); - -static XF86ModuleVersionInfo intel_acpiVersRec = -{ - "intel_acpi", - "Tungsten Graphics, Inc", - MODINFOSTRING1, - MODINFOSTRING2, - XF86_VERSION_CURRENT, - INTEL_MAJOR_VERSION, INTEL_MINOR_VERSION, INTEL_PATCHLEVEL, - ABI_CLASS_EXTENSION, - ABI_EXTENSION_VERSION, - MOD_CLASS_EXTENSION, - {0,0,0,0} -}; - -XF86ModuleData intel_acpiModuleData = { &intel_acpiVersRec, intel_acpiSetup, NULL }; - -ModuleInfoRec INTELACPI = { - 1, - "INTELACPI", - NULL, - 0, - NULL, -}; - -/*ARGSUSED*/ -static pointer -intel_acpiSetup(pointer Module, pointer Options, int *ErrorMajor, int *ErrorMinor) -{ - static Bool Initialised = FALSE; - - if (!Initialised) { - Initialised = TRUE; -#ifndef REMOVE_LOADER_CHECK_MODULE_INFO - if (xf86LoaderCheckSymbol("xf86AddModuleInfo")) -#endif - xf86AddModuleInfo(&INTELACPI, Module); - } - - return (pointer)TRUE; -} -#endif