aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2010-03-24 12:44:33 -0400
committerLen Brown <len.brown@intel.com>2010-04-03 23:32:07 -0400
commitb7b30de53aef6ce773d34837ba7d8422bd3baeec (patch)
treee9a9b9665139c67ccb15b99951516819cb22b6b5 /drivers
parent2eaa9cfdf33b8d7fb7aff27792192e0019ae8fc6 (diff)
ACPI: use _HID when supplied by root-level devices
Previously, we assumed the only Device object immediately below the root was the \_SB Scope (which the ACPI CA treats as a Device), so we forced the HID of all such objects to ACPI_BUS_HID ("LNXSYBUS"). However, there are DSDTs that supply root-level Device objects with _HIDs. This patch makes us pay attention to those _HIDs and only add the synthetic ACPI_BUS_HID for root-level objects that do not supply their own _HID. For example, this DSDT: https://bugzilla.kernel.org/show_bug.cgi?id=15605 contains: Scope (_SB) { ... } Device (AMW0) { Name (_HID, EisaId ("PNP0C14")) ... } and we should use "PNP0C14" for the AMW0 device, not "LNXSYBUS". Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Acked-by: Zhang Rui <rui.zhang@intel.com> Tested-by: Yong Wang <yong.y.wang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/scan.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 189cbc2585fa..95c90ff5b9a3 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -1080,12 +1080,6 @@ static void acpi_device_set_id(struct acpi_device *device)
1080 if (ACPI_IS_ROOT_DEVICE(device)) { 1080 if (ACPI_IS_ROOT_DEVICE(device)) {
1081 acpi_add_id(device, ACPI_SYSTEM_HID); 1081 acpi_add_id(device, ACPI_SYSTEM_HID);
1082 break; 1082 break;
1083 } else if (ACPI_IS_ROOT_DEVICE(device->parent)) {
1084 /* \_SB_, the only root-level namespace device */
1085 acpi_add_id(device, ACPI_BUS_HID);
1086 strcpy(device->pnp.device_name, ACPI_BUS_DEVICE_NAME);
1087 strcpy(device->pnp.device_class, ACPI_BUS_CLASS);
1088 break;
1089 } 1083 }
1090 1084
1091 status = acpi_get_object_info(device->handle, &info); 1085 status = acpi_get_object_info(device->handle, &info);
@@ -1120,6 +1114,12 @@ static void acpi_device_set_id(struct acpi_device *device)
1120 acpi_add_id(device, ACPI_DOCK_HID); 1114 acpi_add_id(device, ACPI_DOCK_HID);
1121 else if (!acpi_ibm_smbus_match(device)) 1115 else if (!acpi_ibm_smbus_match(device))
1122 acpi_add_id(device, ACPI_SMBUS_IBM_HID); 1116 acpi_add_id(device, ACPI_SMBUS_IBM_HID);
1117 else if (!acpi_device_hid(device) &&
1118 ACPI_IS_ROOT_DEVICE(device->parent)) {
1119 acpi_add_id(device, ACPI_BUS_HID); /* \_SB, LNXSYBUS */
1120 strcpy(device->pnp.device_name, ACPI_BUS_DEVICE_NAME);
1121 strcpy(device->pnp.device_class, ACPI_BUS_CLASS);
1122 }
1123 1123
1124 break; 1124 break;
1125 case ACPI_BUS_TYPE_POWER: 1125 case ACPI_BUS_TYPE_POWER: