aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pci-acpi.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/pci-acpi.h')
-rw-r--r--include/linux/pci-acpi.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/pci-acpi.h b/include/linux/pci-acpi.h
index 092e82e0048c..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)
15{ 15{
16 struct pci_bus *pbus = pdev->bus; 16 struct pci_bus *pbus = pdev->bus;
17 /* Find a PCI root bus */ 17 /* Find a PCI root bus */
18 while (pbus->parent) 18 while (!pci_is_root_bus(pbus))
19 pbus = pbus->parent; 19 pbus = pbus->parent;
20 return acpi_get_pci_rootbridge_handle(pci_domain_nr(pbus), 20 return acpi_get_pci_rootbridge_handle(pci_domain_nr(pbus),
21 pbus->number); 21 pbus->number);
@@ -23,7 +23,7 @@ static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev)
23 23
24static inline acpi_handle acpi_pci_get_bridge_handle(struct pci_bus *pbus) 24static inline acpi_handle acpi_pci_get_bridge_handle(struct pci_bus *pbus)
25{ 25{
26 if (pbus->parent) 26 if (!pci_is_root_bus(pbus))
27 return DEVICE_ACPI_HANDLE(&(pbus->self->dev)); 27 return DEVICE_ACPI_HANDLE(&(pbus->self->dev));
28 return acpi_get_pci_rootbridge_handle(pci_domain_nr(pbus), 28 return acpi_get_pci_rootbridge_handle(pci_domain_nr(pbus),
29 pbus->number); 29 pbus->number);