ACPI / TPM: match node name instead of full path when searching for TPM device
authorJiang Liu <jiang.liu@linux.intel.com>
Thu, 19 Dec 2013 12:38:16 +0000 (20:38 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sun, 5 Jan 2014 15:07:14 +0000 (16:07 +0100)
When searching ACPI object for TPM device, it should match current
ACPI object name instead of the full path.

Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/char/tpm/tpm_ppi.c

index e1f3337a0cf9f7d7fa223a86e84282765d915108..1e9cc11ac76afb1ed2cfd4930fac5737ac309122 100644 (file)
@@ -30,7 +30,7 @@ static acpi_status ppi_callback(acpi_handle handle, u32 level, void *context,
        acpi_status status = AE_OK;
        struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
 
-       if (ACPI_SUCCESS(acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer))) {
+       if (ACPI_SUCCESS(acpi_get_name(handle, ACPI_SINGLE_NAME, &buffer))) {
                if (strstr(buffer.pointer, context) != NULL) {
                        *return_value = handle;
                        status = AE_CTRL_TERMINATE;