aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/nsxfeval.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/acpica/nsxfeval.c')
-rw-r--r--drivers/acpi/acpica/nsxfeval.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/drivers/acpi/acpica/nsxfeval.c b/drivers/acpi/acpica/nsxfeval.c
index daf4ad37896d..4929dbdbc8f0 100644
--- a/drivers/acpi/acpica/nsxfeval.c
+++ b/drivers/acpi/acpica/nsxfeval.c
@@ -535,10 +535,11 @@ acpi_ns_get_device_callback(acpi_handle obj_handle,
535 acpi_status status; 535 acpi_status status;
536 struct acpi_namespace_node *node; 536 struct acpi_namespace_node *node;
537 u32 flags; 537 u32 flags;
538 struct acpica_device_id hid; 538 struct acpica_device_id *hid;
539 struct acpi_compatible_id_list *cid; 539 struct acpica_device_id_list *cid;
540 u32 i; 540 u32 i;
541 int found; 541 u8 found;
542 int no_match;
542 543
543 status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE); 544 status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE);
544 if (ACPI_FAILURE(status)) { 545 if (ACPI_FAILURE(status)) {
@@ -582,10 +583,14 @@ acpi_ns_get_device_callback(acpi_handle obj_handle,
582 return (AE_CTRL_DEPTH); 583 return (AE_CTRL_DEPTH);
583 } 584 }
584 585
585 if (ACPI_STRNCMP(hid.value, info->hid, sizeof(hid.value)) != 0) { 586 no_match = ACPI_STRCMP(hid->string, info->hid);
586 587 ACPI_FREE(hid);
587 /* Get the list of Compatible IDs */
588 588
589 if (no_match) {
590 /*
591 * HID does not match, attempt match within the
592 * list of Compatible IDs (CIDs)
593 */
589 status = acpi_ut_execute_CID(node, &cid); 594 status = acpi_ut_execute_CID(node, &cid);
590 if (status == AE_NOT_FOUND) { 595 if (status == AE_NOT_FOUND) {
591 return (AE_OK); 596 return (AE_OK);
@@ -597,10 +602,8 @@ acpi_ns_get_device_callback(acpi_handle obj_handle,
597 602
598 found = 0; 603 found = 0;
599 for (i = 0; i < cid->count; i++) { 604 for (i = 0; i < cid->count; i++) {
600 if (ACPI_STRNCMP(cid->id[i].value, info->hid, 605 if (ACPI_STRCMP(cid->ids[i].string, info->hid)
601 sizeof(struct 606 == 0) {
602 acpi_compatible_id)) ==
603 0) {
604 found = 1; 607 found = 1;
605 break; 608 break;
606 } 609 }