Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 3852
b: refs/heads/master
c: 364d509
h: refs/heads/master
v: v3
  • Loading branch information
Rajesh Shah authored and Greg Kroah-Hartman committed Jun 28, 2005
1 parent 7ae1072 commit c1aa750
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 42f49a6ae5dca90cd0594475502bf1c43ff1dc07
refs/heads/master: 364d5094a43ff2ceff3d19e40c4199771cb6cb8f
34 changes: 26 additions & 8 deletions trunk/drivers/pci/hotplug/acpiphp_glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -487,18 +487,12 @@ static struct acpiphp_bridge *acpiphp_handle_to_bridge(acpi_handle handle)
return NULL;
}

static void remove_bridge(acpi_handle handle)
static void cleanup_bridge(struct acpiphp_bridge *bridge)
{
struct list_head *list, *tmp;
struct acpiphp_bridge *bridge;
struct acpiphp_slot *slot;
acpi_status status;

bridge = acpiphp_handle_to_bridge(handle);
if (!bridge) {
err("Could not find bridge for handle %p\n", handle);
return;
}
acpi_handle handle = bridge->handle;

status = acpi_remove_notify_handler(handle, ACPI_SYSTEM_NOTIFY,
handle_hotplug_event_bridge);
Expand Down Expand Up @@ -529,6 +523,30 @@ static void remove_bridge(acpi_handle handle)
kfree(bridge);
}

static acpi_status
cleanup_p2p_bridge(acpi_handle handle, u32 lvl, void *context, void **rv)
{
struct acpiphp_bridge *bridge;

if (!(bridge = acpiphp_handle_to_bridge(handle)))
return AE_OK;
cleanup_bridge(bridge);
return AE_OK;
}

static void remove_bridge(acpi_handle handle)
{
struct acpiphp_bridge *bridge;

bridge = acpiphp_handle_to_bridge(handle);
if (bridge) {
cleanup_bridge(bridge);
} else {
/* clean-up p2p bridges under this host bridge */
acpi_walk_namespace(ACPI_TYPE_DEVICE, handle,
(u32)1, cleanup_p2p_bridge, NULL, NULL);
}
}

static int power_on_slot(struct acpiphp_slot *slot)
{
Expand Down

0 comments on commit c1aa750

Please sign in to comment.