diff options
author | Jiang Liu <jiang.liu@linux.intel.com> | 2014-02-19 01:02:19 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-02-20 18:27:48 -0500 |
commit | ae3caa80a5d532d334c7a4785d74104e3de5a9ae (patch) | |
tree | 9194e68e495f1e5f59d976e8d723743d0a6b010b | |
parent | 4a6172a4e96f81200de9701c128857b162d1cc6f (diff) |
ACPI: use device name LNXSYBUS.xx for ACPI \_SB and \_TZ objects
Use device name "LNXSYBUS:xx" instead of "device.xx" for ACPI objects
\_SB and \_TZ.
BTW, the original check of "handle == ACPI_ROOT_OBJECT" in statment
"else if (list_empty(&pnp->ids) && handle == ACPI_ROOT_OBJECT)"
is always false because of the code at the begin of that block.
if (handle == ACPI_ROOT_OBJECT) {
acpi_add_id(pnp, ACPI_SYSTEM_HID);
break;
}
Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/acpi/scan.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 57b053f424d1..62ec4ba7ecef 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c | |||
@@ -1706,6 +1706,20 @@ static bool acpi_ibm_smbus_match(acpi_handle handle) | |||
1706 | return false; | 1706 | return false; |
1707 | } | 1707 | } |
1708 | 1708 | ||
1709 | static bool acpi_object_is_system_bus(acpi_handle handle) | ||
1710 | { | ||
1711 | acpi_handle tmp; | ||
1712 | |||
1713 | if (ACPI_SUCCESS(acpi_get_handle(NULL, "\\_SB", &tmp)) && | ||
1714 | tmp == handle) | ||
1715 | return true; | ||
1716 | if (ACPI_SUCCESS(acpi_get_handle(NULL, "\\_TZ", &tmp)) && | ||
1717 | tmp == handle) | ||
1718 | return true; | ||
1719 | |||
1720 | return false; | ||
1721 | } | ||
1722 | |||
1709 | static void acpi_set_pnp_ids(acpi_handle handle, struct acpi_device_pnp *pnp, | 1723 | static void acpi_set_pnp_ids(acpi_handle handle, struct acpi_device_pnp *pnp, |
1710 | int device_type) | 1724 | int device_type) |
1711 | { | 1725 | { |
@@ -1757,8 +1771,10 @@ static void acpi_set_pnp_ids(acpi_handle handle, struct acpi_device_pnp *pnp, | |||
1757 | acpi_add_id(pnp, ACPI_DOCK_HID); | 1771 | acpi_add_id(pnp, ACPI_DOCK_HID); |
1758 | else if (acpi_ibm_smbus_match(handle)) | 1772 | else if (acpi_ibm_smbus_match(handle)) |
1759 | acpi_add_id(pnp, ACPI_SMBUS_IBM_HID); | 1773 | acpi_add_id(pnp, ACPI_SMBUS_IBM_HID); |
1760 | else if (list_empty(&pnp->ids) && handle == ACPI_ROOT_OBJECT) { | 1774 | else if (list_empty(&pnp->ids) && |
1761 | acpi_add_id(pnp, ACPI_BUS_HID); /* \_SB, LNXSYBUS */ | 1775 | acpi_object_is_system_bus(handle)) { |
1776 | /* \_SB, \_TZ, LNXSYBUS */ | ||
1777 | acpi_add_id(pnp, ACPI_BUS_HID); | ||
1762 | strcpy(pnp->device_name, ACPI_BUS_DEVICE_NAME); | 1778 | strcpy(pnp->device_name, ACPI_BUS_DEVICE_NAME); |
1763 | strcpy(pnp->device_class, ACPI_BUS_CLASS); | 1779 | strcpy(pnp->device_class, ACPI_BUS_CLASS); |
1764 | } | 1780 | } |