From: Jiang Liu Date: Thu, 19 Dec 2013 12:38:16 +0000 (+0800) Subject: ACPI / TPM: match node name instead of full path when searching for TPM device X-Git-Tag: firefly_0821_release~176^2~4583^2~9^2~7 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=529139c9736ac71040e589c32ba87d35cc8cbf8f;p=firefly-linux-kernel-4.4.55.git ACPI / TPM: match node name instead of full path when searching for TPM device When searching ACPI object for TPM device, it should match current ACPI object name instead of the full path. Signed-off-by: Jiang Liu Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/char/tpm/tpm_ppi.c b/drivers/char/tpm/tpm_ppi.c index e1f3337a0cf9..1e9cc11ac76a 100644 --- a/drivers/char/tpm/tpm_ppi.c +++ b/drivers/char/tpm/tpm_ppi.c @@ -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;