From patchwork Wed Mar 24 16:44:33 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 87946 X-Patchwork-Delegate: lenb@kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2OGibBJ011124 for ; Wed, 24 Mar 2010 16:44:37 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755575Ab0CXQoh (ORCPT ); Wed, 24 Mar 2010 12:44:37 -0400 Received: from g1t0026.austin.hp.com ([15.216.28.33]:25367 "EHLO g1t0026.austin.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753808Ab0CXQog (ORCPT ); Wed, 24 Mar 2010 12:44:36 -0400 Received: from g1t0039.austin.hp.com (g1t0039.austin.hp.com [16.236.32.45]) by g1t0026.austin.hp.com (Postfix) with ESMTP id 2B9DCC51C; Wed, 24 Mar 2010 16:44:35 +0000 (UTC) Received: from ldl (ldl.fc.hp.com [15.11.146.30]) by g1t0039.austin.hp.com (Postfix) with ESMTP id 14AEE340E3; Wed, 24 Mar 2010 16:44:34 +0000 (UTC) Received: from localhost (ldl.fc.hp.com [127.0.0.1]) by ldl (Postfix) with ESMTP id F3CB6CF0036; Wed, 24 Mar 2010 10:44:33 -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 JH84JC3+++iA; Wed, 24 Mar 2010 10:44:33 -0600 (MDT) Received: from eh.fc.hp.com (eh.fc.hp.com [15.11.146.105]) by ldl (Postfix) with ESMTP id DBDD4CF000A; Wed, 24 Mar 2010 10:44:33 -0600 (MDT) Received: from bob.kio (localhost [127.0.0.1]) by eh.fc.hp.com (Postfix) with ESMTP id 8EDA72617A; Wed, 24 Mar 2010 10:44:33 -0600 (MDT) Subject: [PATCH] ACPI: use _HID when supplied by root-level devices To: Len Brown From: Bjorn Helgaas Cc: linux-acpi@vger.kernel.org, Zhang Rui , Yong Wang Date: Wed, 24 Mar 2010 10:44:33 -0600 Message-ID: <20100324164433.31102.54541.stgit@bob.kio> User-Agent: StGit/0.15 MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 24 Mar 2010 16:44:40 +0000 (UTC) diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index fb7fc24..1d42798 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -1044,12 +1044,6 @@ static void acpi_device_set_id(struct acpi_device *device) if (ACPI_IS_ROOT_DEVICE(device)) { acpi_add_id(device, ACPI_SYSTEM_HID); break; - } else if (ACPI_IS_ROOT_DEVICE(device->parent)) { - /* \_SB_, the only root-level namespace device */ - acpi_add_id(device, ACPI_BUS_HID); - strcpy(device->pnp.device_name, ACPI_BUS_DEVICE_NAME); - strcpy(device->pnp.device_class, ACPI_BUS_CLASS); - break; } status = acpi_get_object_info(device->handle, &info); @@ -1082,6 +1076,12 @@ static void acpi_device_set_id(struct acpi_device *device) acpi_add_id(device, ACPI_BAY_HID); else if (ACPI_SUCCESS(acpi_dock_match(device))) acpi_add_id(device, ACPI_DOCK_HID); + else if (!acpi_device_hid(device) && + ACPI_IS_ROOT_DEVICE(device->parent)) { + acpi_add_id(device, ACPI_BUS_HID); /* \_SB, LNXSYBUS */ + strcpy(device->pnp.device_name, ACPI_BUS_DEVICE_NAME); + strcpy(device->pnp.device_class, ACPI_BUS_CLASS); + } break; case ACPI_BUS_TYPE_POWER: