From patchwork Thu Jan 3 01:52:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rafael Wysocki X-Patchwork-Id: 1926001 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id A8545DF230 for ; Thu, 3 Jan 2013 01:47:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752743Ab3ACBq6 (ORCPT ); Wed, 2 Jan 2013 20:46:58 -0500 Received: from hydra.sisk.pl ([212.160.235.94]:57651 "EHLO hydra.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752739Ab3ACBq6 (ORCPT ); Wed, 2 Jan 2013 20:46:58 -0500 Received: from vostro.rjw.lan (afeo45.neoplus.adsl.tpnet.pl [95.49.118.45]) by hydra.sisk.pl (Postfix) with ESMTPSA id C186BE4020; Thu, 3 Jan 2013 02:47:52 +0100 (CET) From: "Rafael J. Wysocki" To: ACPI Devel Maling List Cc: LKML , Len Brown , Bjorn Helgaas Subject: [PATCH] ACPI / scan: Do not use dummy HID for system bus ACPI nodes Date: Thu, 03 Jan 2013 02:52:33 +0100 Message-ID: <3202600.6sHYvcf502@vostro.rjw.lan> User-Agent: KMail/4.9.4 (Linux/3.8.0-rc1+; KDE/4.9.4; x86_64; ; ) MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Rafael J. Wysocki At one point acpi_device_set_id() checks if acpi_device_hid(device) returns NULL, but that never happens, so system bus devices with an empty list of PNP IDs are given the dummy HID ("device") instead of the "system bus HID" ("LNXSYBUS"). Fix the code to use the right check. Signed-off-by: Rafael J. Wysocki --- drivers/acpi/scan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 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 Index: linux/drivers/acpi/scan.c =================================================================== --- linux.orig/drivers/acpi/scan.c +++ linux/drivers/acpi/scan.c @@ -1398,7 +1398,7 @@ static void acpi_device_set_id(struct ac acpi_add_id(device, ACPI_DOCK_HID); else if (!acpi_ibm_smbus_match(device)) acpi_add_id(device, ACPI_SMBUS_IBM_HID); - else if (!acpi_device_hid(device) && + else if (list_empty(&device->pnp.ids) && ACPI_IS_ROOT_DEVICE(device->parent)) { acpi_add_id(device, ACPI_BUS_HID); /* \_SB, LNXSYBUS */ strcpy(device->pnp.device_name, ACPI_BUS_DEVICE_NAME);