summaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorZhao Yakui <yakui.zhao@intel.com>2010-07-13 03:36:08 +0000
committerLen Brown <len.brown@intel.com>2010-07-26 22:32:13 -0400
commit108029ff84fcad8f9199d2d2e2583ae2747d45a4 (patch)
tree9638986e377a77820b1ad30c0a72d2120b3f6f7b /drivers/acpi
parentdbbe4649d683577de1063dbd9f6da7d4b8de2fed (diff)
downloadop-kernel-dev-108029ff84fcad8f9199d2d2e2583ae2747d45a4.zip
op-kernel-dev-108029ff84fcad8f9199d2d2e2583ae2747d45a4.tar.gz
ACPI: Add the check of ADR flag in course of finding ACPI handle for PCI device
The _ADR object is used to provide OSPM with the address of one device on its parent bus. In course of finding ACPI handle for the corresponding PCI device, we will firstly evaluate the _ADR object and then compare the two addresses to see whether it is the target ACPI device. But for one PCI device(0000:00:00.0) under the PCI root bridge, the corresponding address will be constructed as zero.In such case maybe the ACPI device without _ADR object will be misdetected and then be used to create the relationship between PCI device and ACPI device. https://bugzilla.kernel.org/show_bug.cgi?id=16422 Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/glue.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c
index 4af6301..78b0164 100644
--- a/drivers/acpi/glue.c
+++ b/drivers/acpi/glue.c
@@ -100,7 +100,8 @@ do_acpi_find_child(acpi_handle handle, u32 lvl, void *context, void **rv)
status = acpi_get_object_info(handle, &info);
if (ACPI_SUCCESS(status)) {
- if (info->address == find->address)
+ if ((info->address == find->address)
+ && (info->valid & ACPI_VALID_ADR))
find->handle = handle;
kfree(info);
}
OpenPOWER on IntegriCloud