From patchwork Tue May 26 07:05:33 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kenji Kaneshige X-Patchwork-Id: 25931 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 n4Q74Mcd021310 for ; Tue, 26 May 2009 07:06:00 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751698AbZEZHF6 (ORCPT ); Tue, 26 May 2009 03:05:58 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751755AbZEZHF5 (ORCPT ); Tue, 26 May 2009 03:05:57 -0400 Received: from fgwmail7.fujitsu.co.jp ([192.51.44.37]:46332 "EHLO fgwmail7.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751698AbZEZHF5 (ORCPT ); Tue, 26 May 2009 03:05:57 -0400 Received: from m2.gw.fujitsu.co.jp ([10.0.50.72]) by fgwmail7.fujitsu.co.jp (Fujitsu Gateway) with ESMTP id n4Q75tup031058 for (envelope-from kaneshige.kenji@jp.fujitsu.com); Tue, 26 May 2009 16:05:56 +0900 Received: from smail (m2 [127.0.0.1]) by outgoing.m2.gw.fujitsu.co.jp (Postfix) with ESMTP id 8160945DE65 for ; Tue, 26 May 2009 16:05:55 +0900 (JST) Received: from s2.gw.fujitsu.co.jp (s2.gw.fujitsu.co.jp [10.0.50.92]) by m2.gw.fujitsu.co.jp (Postfix) with ESMTP id 420CA45DE61 for ; Tue, 26 May 2009 16:05:53 +0900 (JST) Received: from s2.gw.fujitsu.co.jp (localhost.localdomain [127.0.0.1]) by s2.gw.fujitsu.co.jp (Postfix) with ESMTP id E922D1DB803E for ; Tue, 26 May 2009 16:05:52 +0900 (JST) Received: from m106.s.css.fujitsu.com (m106.s.css.fujitsu.com [10.249.87.106]) by s2.gw.fujitsu.co.jp (Postfix) with ESMTP id 210CDE1800E for ; Tue, 26 May 2009 16:05:52 +0900 (JST) Received: from m106.css.fujitsu.com (m106 [127.0.0.1]) by m106.s.css.fujitsu.com (Postfix) with ESMTP id D2C6D5B874E; Tue, 26 May 2009 16:05:51 +0900 (JST) Received: from [127.0.0.1] (unknown [10.124.100.137]) by m106.s.css.fujitsu.com (Postfix) with ESMTP id 8B84A5B8749; Tue, 26 May 2009 16:05:50 +0900 (JST) Message-ID: <4A1B94BD.9040506@jp.fujitsu.com> Date: Tue, 26 May 2009 16:05:33 +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 2/6] PCI: use pci_is_root_bus() in acpi_find_root_bridge_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_find_root_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 @@ -15,7 +15,7 @@ static inline acpi_handle acpi_find_root { struct pci_bus *pbus = pdev->bus; /* Find a PCI root bus */ - while (pbus->parent) + while (!pci_is_root_bus(pbus)) pbus = pbus->parent; return acpi_get_pci_rootbridge_handle(pci_domain_nr(pbus), pbus->number);