From patchwork Mon Sep 21 19:28:54 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 49091 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n8LJSloS009091 for ; Mon, 21 Sep 2009 19:28:56 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753318AbZIUT2v (ORCPT ); Mon, 21 Sep 2009 15:28:51 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753338AbZIUT2v (ORCPT ); Mon, 21 Sep 2009 15:28:51 -0400 Received: from g1t0028.austin.hp.com ([15.216.28.35]:31273 "EHLO g1t0028.austin.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753318AbZIUT2v (ORCPT ); Mon, 21 Sep 2009 15:28:51 -0400 Received: from g4t0018.houston.hp.com (g4t0018.houston.hp.com [16.234.32.27]) by g1t0028.austin.hp.com (Postfix) with ESMTP id 3CEB01C2ED; Mon, 21 Sep 2009 19:28:55 +0000 (UTC) Received: from ldl (linux.corp.hp.com [15.11.146.101]) by g4t0018.houston.hp.com (Postfix) with ESMTP id 18F11100F9; Mon, 21 Sep 2009 19:28:55 +0000 (UTC) Received: from localhost (ldl.fc.hp.com [127.0.0.1]) by ldl (Postfix) with ESMTP id 17B01CF000E; Mon, 21 Sep 2009 13:28:55 -0600 (MDT) Received: from ldl ([127.0.0.1]) by localhost (ldl.fc.hp.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XsuLPKefKO8E; Mon, 21 Sep 2009 13:28:55 -0600 (MDT) Received: from eh.fc.hp.com (eh.fc.hp.com [15.11.146.105]) by ldl (Postfix) with ESMTP id 04DCECF000D; Mon, 21 Sep 2009 13:28:55 -0600 (MDT) Received: from bob.kio (localhost [127.0.0.1]) by eh.fc.hp.com (Postfix) with ESMTP id D3D862615C; Mon, 21 Sep 2009 13:28:54 -0600 (MDT) Subject: [PATCH v3 02/17] ACPI: add debug for device addition To: Len Brown From: Bjorn Helgaas Cc: linux-acpi@vger.kernel.org Date: Mon, 21 Sep 2009 13:28:54 -0600 Message-ID: <20090921192854.21322.14281.stgit@bob.kio> In-Reply-To: <20090921192656.21322.23072.stgit@bob.kio> References: <20090921192656.21322.23072.stgit@bob.kio> User-Agent: StGit/0.14.3.386.gb02d MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org Add debug output for adding an ACPI device. Enable this with "acpi.debug_layer=0x00010000" (ACPI_BUS_COMPONENT). Signed-off-by: Bjorn Helgaas --- drivers/acpi/scan.c | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 408ebde..75b7c57 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;