From: Kenji Kaneshige Date: Tue, 26 May 2009 07:05:33 +0000 (+0900) Subject: PCI: use pci_is_root_bus() in acpi_find_root_bridge_handle() X-Git-Tag: v2.6.31-rc1~62^2~41 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=a222b8f83b995e9c6fe2aff2a8125facb49f658e;p=linux.git PCI: use pci_is_root_bus() in acpi_find_root_bridge_handle() Use pci_is_root_bus() in acpi_find_root_bridge_handle() to check if the pci bus is root, for code consistency. Reviewed-by: Alex Chiang Reviewed-by: Grant Grundler Signed-off-by: Kenji Kaneshige Signed-off-by: Jesse Barnes --- diff --git a/include/linux/pci-acpi.h b/include/linux/pci-acpi.h index df67c78dfe24..93a7c08f869d 100644 --- a/include/linux/pci-acpi.h +++ b/include/linux/pci-acpi.h @@ -15,7 +15,7 @@ static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev) { 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);