Initialize ACPI task thread before AcpiEnableSubsystem() installs
authorYONETANI Tomokazu <y0netan1@dragonflybsd.org>
Thu, 25 Jan 2007 02:43:35 +0000 (02:43 +0000)
committerYONETANI Tomokazu <y0netan1@dragonflybsd.org>
Thu, 25 Jan 2007 02:43:35 +0000 (02:43 +0000)
interrupt handlers.

sys/dev/acpica5/acpi.c

index 1b7bb59..dba9c23 100644 (file)
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  *
  *     $FreeBSD: src/sys/dev/acpica/acpi.c,v 1.157 2004/06/05 09:56:04 njl Exp $
- *     $DragonFly: src/sys/dev/acpica5/acpi.c,v 1.28 2007/01/17 17:31:19 y0netan1 Exp $
+ *     $DragonFly: src/sys/dev/acpica5/acpi.c,v 1.29 2007/01/25 02:43:35 y0netan1 Exp $
  */
 
 #include "opt_acpi.h"
@@ -429,6 +429,11 @@ acpi_attach(device_t dev)
     sc->acpi_dev = dev;
     callout_init(&sc->acpi_sleep_timer);
 
+    if ((error = acpi_task_thread_init())) {
+       device_printf(dev, "Could not start task thread.\n");
+       goto out;
+    }
+
     /*
      * Set the globals from our tunables.  This is needed because ACPI-CA
      * uses UINT8 for some values and we have no tunable_byte.
@@ -658,9 +663,6 @@ acpi_attach(device_t dev)
     }
 #endif
 
-    if ((error = acpi_task_thread_init()))
-       goto out;
-
     if ((error = acpi_machdep_init(dev)))
        goto out;