Module Name:    src
Committed By:   jruoho
Date:           Mon Apr 12 18:59:08 UTC 2010

Modified Files:
        src/sys/dev/acpi: acpi.c

Log Message:
Scan the namespace from the root object instead of scanning from separate
scopes. Also raise the namespace walk from 100 (per scope) to UINT32_MAX.

ok jmcneill@


To generate a diff of this commit:
cvs rdiff -u -r1.166 -r1.167 src/sys/dev/acpi/acpi.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/acpi/acpi.c
diff -u src/sys/dev/acpi/acpi.c:1.166 src/sys/dev/acpi/acpi.c:1.167
--- src/sys/dev/acpi/acpi.c:1.166	Mon Apr 12 18:55:27 2010
+++ src/sys/dev/acpi/acpi.c	Mon Apr 12 18:59:08 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi.c,v 1.166 2010/04/12 18:55:27 jruoho Exp $	*/
+/*	$NetBSD: acpi.c,v 1.167 2010/04/12 18:59:08 jruoho Exp $	*/
 
 /*-
  * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.166 2010/04/12 18:55:27 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.167 2010/04/12 18:59:08 jruoho Exp $");
 
 #include "opt_acpi.h"
 #include "opt_pcifixup.h"
@@ -653,31 +653,14 @@
 /*
  * acpi_build_tree:
  *
- *	Scan relevant portions of the ACPI namespace and attach
- *	child devices.
+ *	Scan the ACPI namespace and attach child devices.
  */
 static void
 acpi_build_tree(struct acpi_softc *sc)
 {
-	static const char *scopes[] = {
-		"\\_PR_", "\\_SB_", "\\_SI_", "\\_TZ_", NULL
-	};
 
-	ACPI_HANDLE parent;
-	ACPI_STATUS rv;
-	int i;
-
-	/*
-	 * Scan the namespace and build our device tree.
-	 */
-	for (i = 0; scopes[i] != NULL; i++) {
-
-		rv = AcpiGetHandle(ACPI_ROOT_OBJECT, scopes[i], &parent);
-
-		if (ACPI_SUCCESS(rv))
-			(void)AcpiWalkNamespace(ACPI_TYPE_ANY, parent, 100,
-			    acpi_make_devnode, NULL, sc, NULL);
-	}
+	(void)AcpiWalkNamespace(ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
+	    UINT32_MAX, acpi_make_devnode, NULL, sc, NULL);
 
 	acpi_rescan1(sc, NULL, NULL);
 	acpi_rescan_capabilities(sc);

Reply via email to