ACPI: use acpi_walk_namespace() to enumerate devices
authorBjorn Helgaas <bjorn.helgaas@hp.com>
Mon, 21 Sep 2009 19:29:56 +0000 (19:29 +0000)
committerLen Brown <len.brown@intel.com>
Fri, 25 Sep 2009 18:24:30 +0000 (14:24 -0400)
commit51a85faf2d4ffecd8384b3f501f9f7ee2b05ee53
tree6ca93c9b1a14da2fb140a74f3f3b23976b5ecd0b
parent859ac9a4be0c753cece0e30a2e4a65fd2cdcaeee
ACPI: use acpi_walk_namespace() to enumerate devices

acpi_bus_scan() currently walks the namespace manually.  This patch changes
it to use acpi_walk_namespace() instead.

Besides removing some complicated code, this means we take advantage of the
namespace locking done by acpi_walk_namespace().  The locking isn't so
important at boot-time, but I hope to eventually use this same path to
handle hot-addition of devices, when it will be important.

Note that acpi_walk_namespace() does not actually visit the starting node
first, so we need to do that by hand first.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/scan.c