summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2009-09-21 19:28:54 +0000
committerLen Brown <len.brown@intel.com>2009-09-25 14:24:23 -0400
commit29aaefa68f933110e577fbf3ca360c88331e5ff5 (patch)
tree3ecf97e11f3b1f068ce114b4649cef0d654ba526 /drivers
parentb24715027aab5e586c4ab1d035f3e543307dea69 (diff)
ACPI: add debug for device addition
Add debug output for adding an ACPI device. Enable this with "acpi.debug_layer=0x00010000" (ACPI_BUS_COMPONENT). Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/scan.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 408ebde18986..75b7c572ef45 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -1230,6 +1230,7 @@ acpi_add_single_object(struct acpi_device **child,
{
int result = 0;
struct acpi_device *device = NULL;
+ struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
if (!child)
@@ -1355,9 +1356,16 @@ acpi_add_single_object(struct acpi_device **child,
}
end:
- if (!result)
+ if (!result) {
+ acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
+ ACPI_DEBUG_PRINT((ACPI_DB_INFO,
+ "Adding %s [%s] parent %s\n", dev_name(&device->dev),
+ (char *) buffer.pointer,
+ device->parent ? dev_name(&device->parent->dev) :
+ "(null)"));
+ kfree(buffer.pointer);
*child = device;
- else
+ } else
acpi_device_release(&device->dev);
return result;