aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/pci-acpi.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/include/linux/pci-acpi.h b/include/linux/pci-acpi.h
index 20480b9f10c8..3cee2367459f 100644
--- a/include/linux/pci-acpi.h
+++ b/include/linux/pci-acpi.h
@@ -23,11 +23,10 @@ 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 int seg = pci_domain_nr(pbus), busnr = pbus->number; 26 if (pbus->parent)
27 struct pci_dev *bridge = pbus->self; 27 return DEVICE_ACPI_HANDLE(&(pbus->self->dev));
28 if (bridge) 28 return acpi_get_pci_rootbridge_handle(pci_domain_nr(pbus),
29 return DEVICE_ACPI_HANDLE(&(bridge->dev)); 29 pbus->number);
30 return acpi_get_pci_rootbridge_handle(seg, busnr);
31} 30}
32#else 31#else
33static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev) 32static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev)