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 /drivers/pci/hotplug | |
| parent | 168ae6a08aa6e0cf8b0166dedeb675a20af1fbb7 (diff) | |
| parent | cd4faf9c34b27cbb6bcc70a4f1d1759f2e6fa7fd (diff) | |
Merge branch 'pci/taku-acpi-pci-host-bridge-v3' into next
Diffstat (limited to 'drivers/pci/hotplug')
| -rw-r--r-- | drivers/pci/hotplug/acpiphp_glue.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c index 7be4ca5e1f4..466233b481b 100644 --- a/drivers/pci/hotplug/acpiphp_glue.c +++ b/drivers/pci/hotplug/acpiphp_glue.c | |||
| @@ -382,10 +382,10 @@ static inline void config_p2p_bridge_flags(struct acpiphp_bridge *bridge) | |||
| 382 | 382 | ||
| 383 | 383 | ||
| 384 | /* allocate and initialize host bridge data structure */ | 384 | /* allocate and initialize host bridge data structure */ |
| 385 | static void add_host_bridge(acpi_handle *handle) | 385 | static void add_host_bridge(struct acpi_pci_root *root) |
| 386 | { | 386 | { |
| 387 | struct acpiphp_bridge *bridge; | 387 | struct acpiphp_bridge *bridge; |
| 388 | struct acpi_pci_root *root = acpi_pci_find_root(handle); | 388 | acpi_handle handle = root->device->handle; |
| 389 | 389 | ||
| 390 | bridge = kzalloc(sizeof(struct acpiphp_bridge), GFP_KERNEL); | 390 | bridge = kzalloc(sizeof(struct acpiphp_bridge), GFP_KERNEL); |
| 391 | if (bridge == NULL) | 391 | if (bridge == NULL) |
| @@ -468,11 +468,12 @@ find_p2p_bridge(acpi_handle handle, u32 lvl, void *context, void **rv) | |||
| 468 | 468 | ||
| 469 | 469 | ||
| 470 | /* find hot-pluggable slots, and then find P2P bridge */ | 470 | /* find hot-pluggable slots, and then find P2P bridge */ |
| 471 | static int add_bridge(acpi_handle handle) | 471 | static int add_bridge(struct acpi_pci_root *root) |
| 472 | { | 472 | { |
| 473 | acpi_status status; | 473 | acpi_status status; |
| 474 | unsigned long long tmp; | 474 | unsigned long long tmp; |
| 475 | acpi_handle dummy_handle; | 475 | acpi_handle dummy_handle; |
| 476 | acpi_handle handle = root->device->handle; | ||
| 476 | 477 | ||
| 477 | /* if the bridge doesn't have _STA, we assume it is always there */ | 478 | /* if the bridge doesn't have _STA, we assume it is always there */ |
| 478 | status = acpi_get_handle(handle, "_STA", &dummy_handle); | 479 | status = acpi_get_handle(handle, "_STA", &dummy_handle); |
| @@ -490,7 +491,7 @@ static int add_bridge(acpi_handle handle) | |||
| 490 | /* check if this bridge has ejectable slots */ | 491 | /* check if this bridge has ejectable slots */ |
| 491 | if (detect_ejectable_slots(handle) > 0) { | 492 | if (detect_ejectable_slots(handle) > 0) { |
| 492 | dbg("found PCI host-bus bridge with hot-pluggable slots\n"); | 493 | dbg("found PCI host-bus bridge with hot-pluggable slots\n"); |
| 493 | add_host_bridge(handle); | 494 | add_host_bridge(root); |
| 494 | } | 495 | } |
| 495 | 496 | ||
| 496 | /* search P2P bridges under this host bridge */ | 497 | /* search P2P bridges under this host bridge */ |
| @@ -588,9 +589,10 @@ cleanup_p2p_bridge(acpi_handle handle, u32 lvl, void *context, void **rv) | |||
| 588 | return AE_OK; | 589 | return AE_OK; |
| 589 | } | 590 | } |
| 590 | 591 | ||
| 591 | static void remove_bridge(acpi_handle handle) | 592 | static void remove_bridge(struct acpi_pci_root *root) |
| 592 | { | 593 | { |
| 593 | struct acpiphp_bridge *bridge; | 594 | struct acpiphp_bridge *bridge; |
| 595 | acpi_handle handle = root->device->handle; | ||
| 594 | 596 | ||
| 595 | /* cleanup p2p bridges under this host bridge | 597 | /* cleanup p2p bridges under this host bridge |
| 596 | in a depth-first manner */ | 598 | in a depth-first manner */ |
