summaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2008-02-07 09:11:56 +0100
committerLen Brown <len.brown@intel.com>2008-02-07 09:11:56 +0100
commitd870ec7281d8429ab17d2e0324f4d8ca3f3de62d (patch)
tree2cb8ec870117e33535db21a8bb5fc6f4f4459124 /drivers/acpi
parentMerge branches 'release' and 'gpe-ack' into release (diff)
parentACPI: Check for any matching CID when walking namespace. (diff)
downloadlinux-d870ec7281d8429ab17d2e0324f4d8ca3f3de62d.tar.xz
linux-d870ec7281d8429ab17d2e0324f4d8ca3f3de62d.zip
Merge branches 'release' and 'hp-cid' into release
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/namespace/nsxfeval.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/acpi/namespace/nsxfeval.c b/drivers/acpi/namespace/nsxfeval.c
index f39fbc6b9237..b92133faf5b7 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);
}
}