acpi: FACS is already loaded, don't load it manually again
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 17 Apr 2011 08:24:53 +0000 (16:24 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 17 Apr 2011 08:46:59 +0000 (16:46 +0800)
sys/dev/acpica5/acpi.c

index 64f6970..776e6fa 100644 (file)
@@ -406,7 +406,6 @@ static int
 acpi_attach(device_t dev)
 {
     struct acpi_softc  *sc;
-    ACPI_TABLE_FACS    *facs;
     ACPI_STATUS                status;
     int                        error, state;
     UINT32             flags;
@@ -591,14 +590,7 @@ acpi_attach(device_t dev)
        sc->acpi_handle_reboot = 1;
 
     /* Only enable S4BIOS by default if the FACS says it is available. */
-    status = AcpiGetTable(ACPI_SIG_FACS, 0, (ACPI_TABLE_HEADER **)&facs);
-    if (ACPI_FAILURE(status)) {
-       device_printf(dev, "couldn't get FACS: %s\n",
-                     AcpiFormatException(status));
-       error = ENXIO;
-       goto out;
-    }
-    if (facs->Flags & ACPI_FACS_S4_BIOS_PRESENT)
+    if (AcpiGbl_FACS->Flags & ACPI_FACS_S4_BIOS_PRESENT)
        sc->acpi_s4bios = 1;
 
     /*