ACPI: identify device tree root by null parent pointer, not ACPI_BUS_TYPE
commit859ac9a4be0c753cece0e30a2e4a65fd2cdcaeee
authorBjorn Helgaas <bjorn.helgaas@hp.com>
Mon, 21 Sep 2009 19:29:50 +0000 (21 19:29 +0000)
committerLen Brown <len.brown@intel.com>
Fri, 25 Sep 2009 18:24:29 +0000 (25 14:24 -0400)
tree10962790433ee0865ab6506c69981e8248368e46
parentadc08e2035f1859d4b129f42b2c2305ef090d226
ACPI: identify device tree root by null parent pointer, not ACPI_BUS_TYPE

We can identify the root of the ACPI device tree by the fact that it
has no parent.  This is simpler than passing around ACPI_BUS_TYPE_SYSTEM
and will help remove special treatment of the device tree root.

Currently, we add the root by hand with ACPI_BUS_TYPE_SYSTEM.  If we
traverse the tree treating the root as just another device and use
acpi_get_type(), the root shows up as ACPI_TYPE_DEVICE.

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