diff mbox

[2.6.35.stable] ACPI: install ACPI table handler before any dynamic tables being loaded

Message ID alpine.LFD.2.00.1011012309280.14926@localhost.localdomain (mailing list archive)
State New, archived
Headers show

Commit Message

Len Brown Nov. 2, 2010, 3:18 a.m. UTC
None
diff mbox

Patch

Index: linux-2.6.35.y/drivers/acpi/bus.c
===================================================================
--- linux-2.6.35.y.orig/drivers/acpi/bus.c
+++ linux-2.6.35.y/drivers/acpi/bus.c
@@ -935,6 +935,12 @@  static int __init acpi_bus_init(void)
 		goto error1;
 	}
 
+	/*
+	 * _PDC control method may load dynamic SSDT tables,
+	 * and we need to install the table handler before that.
+	*/
+	acpi_system_sysfs_init();
+
 	acpi_early_processor_set_pdc();
 
 	/*
Index: linux-2.6.35.y/drivers/acpi/internal.h
===================================================================
--- linux-2.6.35.y.orig/drivers/acpi/internal.h
+++ linux-2.6.35.y/drivers/acpi/internal.h
@@ -23,6 +23,7 @@ 
 int init_acpi_device_notify(void);
 int acpi_scan_init(void);
 int acpi_system_init(void);
+int acpi_system_sysfs_init(void);
 
 #ifdef CONFIG_ACPI_DEBUG
 int acpi_debug_init(void);
Index: linux-2.6.35.y/drivers/acpi/system.c
===================================================================
--- linux-2.6.35.y.orig/drivers/acpi/system.c
+++ linux-2.6.35.y/drivers/acpi/system.c
@@ -164,7 +164,7 @@  acpi_sysfs_table_handler(u32 event, void
 	return AE_OK;
 }
 
-static int acpi_system_sysfs_init(void)
+int __init acpi_system_sysfs_init(void)
 {
 	struct acpi_table_attr *table_attr;
 	struct acpi_table_header *table_header = NULL;
@@ -627,13 +627,6 @@  static int acpi_system_procfs_init(void)
 
 int __init acpi_system_init(void)
 {
-	int result;
-
-	result = acpi_system_procfs_init();
-	if (result)
-		return result;
-
-	result = acpi_system_sysfs_init();
-
-	return result;
+	return acpi_system_procfs_init();
 }
+