Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=02f8a8586574350a1f3c2cee79cbc0faf630961d
Commit:     02f8a8586574350a1f3c2cee79cbc0faf630961d
Parent:     cbd9c883696da72b2b1f03f909dbacc04bbf8b58
Author:     Andrew Patterson <[EMAIL PROTECTED]>
AuthorDate: Tue Jan 22 17:18:22 2008 -0700
Committer:  Len Brown <[EMAIL PROTECTED]>
CommitDate: Wed Jan 23 14:43:44 2008 -0500

    ACPI: Check for any matching CID when walking namespace.
    
    The callback function acpi_ns_get_device_callback called from
    acpi_get_devices() will check CID's if the HID does not match.  This code
    has a bug where it requires that all CIDs match the HID. Changed the code
    so that any CID match will do.
    
    Signed-off-by: Andrew Patterson <[EMAIL PROTECTED]>
    Signed-off-by: Len Brown <[EMAIL PROTECTED]>
---
 drivers/acpi/namespace/nsxfeval.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/acpi/namespace/nsxfeval.c 
b/drivers/acpi/namespace/nsxfeval.c
index f39fbc6..b92133f 100644
--- a/drivers/acpi/namespace/nsxfeval.c
+++ b/drivers/acpi/namespace/nsxfeval.c
@@ -443,6 +443,7 @@ acpi_ns_get_device_callback(acpi_handle obj_handle,
        struct acpica_device_id hid;
        struct acpi_compatible_id_list *cid;
        acpi_native_uint i;
+       int found;
 
        status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE);
        if (ACPI_FAILURE(status)) {
@@ -496,16 +497,19 @@ acpi_ns_get_device_callback(acpi_handle obj_handle,
 
                        /* Walk the CID list */
 
+                       found = 0;
                        for (i = 0; i < cid->count; i++) {
                                if (ACPI_STRNCMP(cid->id[i].value, info->hid,
                                                 sizeof(struct
-                                                       acpi_compatible_id)) !=
+                                                       acpi_compatible_id)) ==
                                    0) {
-                                       ACPI_FREE(cid);
-                                       return (AE_OK);
+                                       found = 1;
+                                       break;
                                }
                        }
                        ACPI_FREE(cid);
+                       if (!found)
+                               return (AE_OK);
                }
        }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to