diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2012-09-24 18:36:10 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2012-09-24 18:36:10 -0400 |
commit | 18d63c35a265465b7137c4ea9c6b135aada13c3c (patch) | |
tree | 1bff6e43ec609a86596d4704f3d50cf0adcfff74 /include/linux | |
parent | 168ae6a08aa6e0cf8b0166dedeb675a20af1fbb7 (diff) | |
parent | cd4faf9c34b27cbb6bcc70a4f1d1759f2e6fa7fd (diff) |
Merge branch 'pci/taku-acpi-pci-host-bridge-v3' into next
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/acpi.h | 6 | ||||
-rw-r--r-- | include/linux/pci-acpi.h | 17 |
2 files changed, 14 insertions, 9 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 4f2a76224509..90be98981102 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -138,9 +138,9 @@ void acpi_penalize_isa_irq(int irq, int active); | |||
138 | void acpi_pci_irq_disable (struct pci_dev *dev); | 138 | void acpi_pci_irq_disable (struct pci_dev *dev); |
139 | 139 | ||
140 | struct acpi_pci_driver { | 140 | struct acpi_pci_driver { |
141 | struct acpi_pci_driver *next; | 141 | struct list_head node; |
142 | int (*add)(acpi_handle handle); | 142 | int (*add)(struct acpi_pci_root *root); |
143 | void (*remove)(acpi_handle handle); | 143 | void (*remove)(struct acpi_pci_root *root); |
144 | }; | 144 | }; |
145 | 145 | ||
146 | int acpi_pci_register_driver(struct acpi_pci_driver *driver); | 146 | int acpi_pci_register_driver(struct acpi_pci_driver *driver); |
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 | ||