summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <anholt@FreeBSD.org>2006-05-12 15:54:37 -0700
committerEric Anholt <anholt@FreeBSD.org>2006-05-12 15:54:37 -0700
commit2e58aa401dfbab438752038a9034df571c8f8bde (patch)
treea793191b37ea8a3c29c38b3a13498a938c481384 /src
parent2cd6c8fa2321ca217ef89db1027dbe9e716ad7aa (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/i830_driver.c14
-rw-r--r--src/intel_acpi.c52
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 <fcntl.h>
#include <errno.h>
@@ -5,7 +9,8 @@
#endif
#include <sys/un.h>
#include <sys/socket.h>
-#include "X.h"
+#include <sys/fcntl.h>
+#include <sys/errno.h>
#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