From patchwork Tue Jul 13 03:36:08 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhao, Yakui" X-Patchwork-Id: 111654 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o6D3gANa026073 for ; Tue, 13 Jul 2010 03:42:10 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751868Ab0GMDmG (ORCPT ); Mon, 12 Jul 2010 23:42:06 -0400 Received: from mga09.intel.com ([134.134.136.24]:41455 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751719Ab0GMDmF (ORCPT ); Mon, 12 Jul 2010 23:42:05 -0400 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 12 Jul 2010 20:39:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.55,192,1278313200"; d="scan'208";a="637814702" Received: from yakui_zhao.sh.intel.com (HELO localhost.localdomain) ([10.239.13.79]) by orsmga001.jf.intel.com with ESMTP; 12 Jul 2010 20:39:53 -0700 From: yakui.zhao@intel.com To: lenb@kernel.org Cc: linux-acpi@vger.kernel.org, Zhao Yakui Subject: [PATCH] ACPI: Add the check of ADR flag in course of finding ACPI handle for PCI device Date: Tue, 13 Jul 2010 11:36:08 +0800 Message-Id: <1278992168-7457-1-git-send-email-yakui.zhao@intel.com> X-Mailer: git-send-email 1.5.4.5 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 13 Jul 2010 03:42:11 +0000 (UTC) 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); }