From patchwork Tue May 26 07:05:06 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kenji Kaneshige X-Patchwork-Id: 25930 X-Patchwork-Delegate: jbarnes@virtuousgeek.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n4Q74Mcb021310 for ; Tue, 26 May 2009 07:05:27 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751300AbZEZHFY (ORCPT ); Tue, 26 May 2009 03:05:24 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751698AbZEZHFY (ORCPT ); Tue, 26 May 2009 03:05:24 -0400 Received: from fgwmail5.fujitsu.co.jp ([192.51.44.35]:39549 "EHLO fgwmail5.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751300AbZEZHFY (ORCPT ); Tue, 26 May 2009 03:05:24 -0400 Received: from m1.gw.fujitsu.co.jp ([10.0.50.71]) by fgwmail5.fujitsu.co.jp (Fujitsu Gateway) with ESMTP id n4Q75P8p026892 for (envelope-from kaneshige.kenji@jp.fujitsu.com); Tue, 26 May 2009 16:05:25 +0900 Received: from smail (m1 [127.0.0.1]) by outgoing.m1.gw.fujitsu.co.jp (Postfix) with ESMTP id 424A145DD75 for ; Tue, 26 May 2009 16:05:25 +0900 (JST) Received: from s1.gw.fujitsu.co.jp (s1.gw.fujitsu.co.jp [10.0.50.91]) by m1.gw.fujitsu.co.jp (Postfix) with ESMTP id 1B92745DD70 for ; Tue, 26 May 2009 16:05:25 +0900 (JST) Received: from s1.gw.fujitsu.co.jp (localhost.localdomain [127.0.0.1]) by s1.gw.fujitsu.co.jp (Postfix) with ESMTP id CF010E08005 for ; Tue, 26 May 2009 16:05:24 +0900 (JST) Received: from ml14.s.css.fujitsu.com (ml14.s.css.fujitsu.com [10.249.87.104]) by s1.gw.fujitsu.co.jp (Postfix) with ESMTP id 7F790E18002 for ; Tue, 26 May 2009 16:05:24 +0900 (JST) Received: from ml14.css.fujitsu.com (ml14 [127.0.0.1]) by ml14.s.css.fujitsu.com (Postfix) with ESMTP id 452739F60F9; Tue, 26 May 2009 16:05:24 +0900 (JST) Received: from [127.0.0.1] (unknown [10.124.100.137]) by ml14.s.css.fujitsu.com (Postfix) with ESMTP id D3B8A9F60F2; Tue, 26 May 2009 16:05:23 +0900 (JST) Message-ID: <4A1B94A2.8030906@jp.fujitsu.com> Date: Tue, 26 May 2009 16:05:06 +0900 From: Kenji Kaneshige User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: "linux-pci@vger.kernel.org" , Jesse Barnes Subject: [PATCH 1/6] PCI: use pci_is_root_bus() in acpi_pci_get_birdge_handle() References: <4A1B9460.8040008@jp.fujitsu.com> In-Reply-To: <4A1B9460.8040008@jp.fujitsu.com> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Use pci_is_root_bus() in acpi_pci_get_bridge_handle() to check if the pci bus is root, for code consistency. Signed-off-by: Kenji Kaneshige --- include/linux/pci-acpi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: 20090526/include/linux/pci-acpi.h =================================================================== --- 20090526.orig/include/linux/pci-acpi.h +++ 20090526/include/linux/pci-acpi.h @@ -23,7 +23,7 @@ static inline acpi_handle acpi_find_root static inline acpi_handle acpi_pci_get_bridge_handle(struct pci_bus *pbus) { - if (pbus->parent) + if (!pci_is_root_bus(pbus)) return DEVICE_ACPI_HANDLE(&(pbus->self->dev)); return acpi_get_pci_rootbridge_handle(pci_domain_nr(pbus), pbus->number);