Skip to content

Commit

Permalink
ACPI: add debug for device addition
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bjorn Helgaas authored and Len Brown committed Sep 25, 2009
1 parent b247150 commit 29aaefa
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions drivers/acpi/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 29aaefa

Please sign in to comment.