]> rtime.felk.cvut.cz Git - lisovros/linux_canprio.git/commitdiff
PCI: use pci_is_root_bus() in acpi_pci_get_bridge_handle()
authorKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Tue, 26 May 2009 07:05:06 +0000 (16:05 +0900)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Tue, 16 Jun 2009 21:29:29 +0000 (14:29 -0700)
Use pci_is_root_bus() in acpi_pci_get_bridge_handle() to check if the
pci bus is root, for code consistency.

Reviewed-by: Grant Grundler <grundler@parisc-linux.org>
Reviewed-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
include/linux/pci-acpi.h

index 092e82e0048c969e7b54b17dbd6dcd548969bb6c..df67c78dfe243700458728f744b8f36a1d60188d 100644 (file)
@@ -23,7 +23,7 @@ static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev)
 
 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);