diff options
Diffstat (limited to 'include/linux/pci-acpi.h')
-rw-r--r-- | include/linux/pci-acpi.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/include/linux/pci-acpi.h b/include/linux/pci-acpi.h index 248fba2af98a..9a22b5efb384 100644 --- a/include/linux/pci-acpi.h +++ b/include/linux/pci-acpi.h | |||
@@ -22,19 +22,24 @@ extern phys_addr_t acpi_pci_root_get_mcfg_addr(acpi_handle handle); | |||
22 | static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev) | 22 | static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev) |
23 | { | 23 | { |
24 | struct pci_bus *pbus = pdev->bus; | 24 | struct pci_bus *pbus = pdev->bus; |
25 | |||
25 | /* Find a PCI root bus */ | 26 | /* Find a PCI root bus */ |
26 | while (!pci_is_root_bus(pbus)) | 27 | while (!pci_is_root_bus(pbus)) |
27 | pbus = pbus->parent; | 28 | pbus = pbus->parent; |
28 | return acpi_get_pci_rootbridge_handle(pci_domain_nr(pbus), | 29 | |
29 | pbus->number); | 30 | return DEVICE_ACPI_HANDLE(pbus->bridge); |
30 | } | 31 | } |
31 | 32 | ||
32 | static inline acpi_handle acpi_pci_get_bridge_handle(struct pci_bus *pbus) | 33 | static inline acpi_handle acpi_pci_get_bridge_handle(struct pci_bus *pbus) |
33 | { | 34 | { |
34 | if (!pci_is_root_bus(pbus)) | 35 | struct device *dev; |
35 | return DEVICE_ACPI_HANDLE(&(pbus->self->dev)); | 36 | |
36 | return acpi_get_pci_rootbridge_handle(pci_domain_nr(pbus), | 37 | if (pci_is_root_bus(pbus)) |
37 | pbus->number); | 38 | dev = pbus->bridge; |
39 | else | ||
40 | dev = &pbus->self->dev; | ||
41 | |||
42 | return DEVICE_ACPI_HANDLE(dev); | ||
38 | } | 43 | } |
39 | #endif | 44 | #endif |
40 | 45 | ||