AcpiTbDeleteTable() now takes a (ACPI_TABLE_DESC *) as its argument,
authorYONETANI Tomokazu <y0netan1@dragonflybsd.org>
Fri, 19 Jan 2007 16:41:28 +0000 (16:41 +0000)
committerYONETANI Tomokazu <y0netan1@dragonflybsd.org>
Fri, 19 Jan 2007 16:41:28 +0000 (16:41 +0000)
not the index of the table to delete.

sys/dev/acpica5/Makefile
sys/dev/acpica5/tables,tbxface.c.patch [new file with mode: 0644]

index 3af3dd7..33be70f 100644 (file)
@@ -1,8 +1,9 @@
 # $FreeBSD: src/sys/modules/acpi/acpi/Makefile,v 1.3 2004/01/08 16:38:32 njl Exp $
-# $DragonFly: src/sys/dev/acpica5/Makefile,v 1.16 2007/01/19 07:23:42 dillon Exp $
+# $DragonFly: src/sys/dev/acpica5/Makefile,v 1.17 2007/01/19 16:41:28 y0netan1 Exp $
 
 CONTRIBDIR=    ${SYSDIR}/${ACPICA_DIR}
-PATCHES=       hardware,hwsleep.c.patch include,acglobal.h.patch
+PATCHES=       hardware,hwsleep.c.patch include,acglobal.h.patch \
+               tables,tbxface.c.patch
 
 SYSDIR?= ${.CURDIR}/../..
 .if ACPI_DEBUG_LOCKS || ACPI_DEBUG_MEMMAP
diff --git a/sys/dev/acpica5/tables,tbxface.c.patch b/sys/dev/acpica5/tables,tbxface.c.patch
new file mode 100644 (file)
index 0000000..5552e2c
--- /dev/null
@@ -0,0 +1,25 @@
+# $DragonFly: src/sys/dev/acpica5/tables,tbxface.c.patch,v 1.1 2007/01/19 16:41:28 y0netan1 Exp $
+
+--- tbxface.c.orig     2007-01-18 01:29:44.000000000 +0900
++++ tbxface.c  2007-01-20 01:09:28.000000000 +0900
+@@ -562,13 +562,16 @@
+                 AcpiGbl_RootTableList.Tables[ACPI_TABLE_INDEX_DSDT].Pointer, &Table);
+     if (ACPI_SUCCESS (Status) && Table)
+     {
++      ACPI_TABLE_DESC *dsdt;
++
+         /*
+          * DSDT table has been found
+          */
+-        AcpiTbDeleteTable (ACPI_TABLE_INDEX_DSDT);
+-        AcpiGbl_RootTableList.Tables[ACPI_TABLE_INDEX_DSDT].Pointer = Table;
+-        AcpiGbl_RootTableList.Tables[ACPI_TABLE_INDEX_DSDT].Length = Table->Length;
+-        AcpiGbl_RootTableList.Tables[ACPI_TABLE_INDEX_DSDT].Flags = ACPI_TABLE_ORIGIN_UNKNOWN;
++        dsdt = &AcpiGbl_RootTableList.Tables[ACPI_TABLE_INDEX_DSDT];
++        AcpiTbDeleteTable (dsdt);
++        dsdt->Pointer = Table;
++        dsdt->Length = Table->Length;
++        dsdt->Flags = ACPI_TABLE_ORIGIN_UNKNOWN;
+         ACPI_INFO ((AE_INFO, "Table DSDT replaced by host OS"));
+         AcpiTbPrintTableHeader (0, Table);