summaryrefslogtreecommitdiff
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.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)
static inline acpi_handle acpi_pci_get_bridge_handle(struct pci_bus *pbus)
{
- int seg = pci_domain_nr(pbus), busnr = pbus->number;
- struct pci_dev *bridge = pbus->self;
- if (bridge)
- return DEVICE_ACPI_HANDLE(&(bridge->dev));
- return acpi_get_pci_rootbridge_handle(seg, busnr);
+ if (pbus->parent)
+ return DEVICE_ACPI_HANDLE(&(pbus->self->dev));
+ return acpi_get_pci_rootbridge_handle(pci_domain_nr(pbus),
+ pbus->number);
}
#else
static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev)