diff options
| -rw-r--r-- | drivers/pci/hotplug/acpiphp_glue.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c index 91276f9fe268..903af4d4a383 100644 --- a/drivers/pci/hotplug/acpiphp_glue.c +++ b/drivers/pci/hotplug/acpiphp_glue.c | |||
| @@ -255,9 +255,15 @@ static void acpiphp_dock_release(void *data) | |||
| 255 | put_bridge(context->func.parent); | 255 | put_bridge(context->func.parent); |
| 256 | } | 256 | } |
| 257 | 257 | ||
| 258 | /* callback routine to register each ACPI PCI slot object */ | 258 | /** |
| 259 | static acpi_status register_slot(acpi_handle handle, u32 lvl, void *data, | 259 | * acpiphp_add_context - Add ACPIPHP context to an ACPI device object. |
| 260 | void **rv) | 260 | * @handle: ACPI handle of the object to add a context to. |
| 261 | * @lvl: Not used. | ||
| 262 | * @data: The object's parent ACPIPHP bridge. | ||
| 263 | * @rv: Not used. | ||
| 264 | */ | ||
| 265 | static acpi_status acpiphp_add_context(acpi_handle handle, u32 lvl, void *data, | ||
| 266 | void **rv) | ||
| 261 | { | 267 | { |
| 262 | struct acpiphp_bridge *bridge = data; | 268 | struct acpiphp_bridge *bridge = data; |
| 263 | struct acpiphp_context *context; | 269 | struct acpiphp_context *context; |
| @@ -930,14 +936,14 @@ void acpiphp_enumerate_slots(struct pci_bus *bus) | |||
| 930 | acpi_unlock_hp_context(); | 936 | acpi_unlock_hp_context(); |
| 931 | } | 937 | } |
| 932 | 938 | ||
| 933 | /* must be added to the list prior to calling register_slot */ | 939 | /* Must be added to the list prior to calling acpiphp_add_context(). */ |
| 934 | mutex_lock(&bridge_mutex); | 940 | mutex_lock(&bridge_mutex); |
| 935 | list_add(&bridge->list, &bridge_list); | 941 | list_add(&bridge->list, &bridge_list); |
| 936 | mutex_unlock(&bridge_mutex); | 942 | mutex_unlock(&bridge_mutex); |
| 937 | 943 | ||
| 938 | /* register all slot objects under this bridge */ | 944 | /* register all slot objects under this bridge */ |
| 939 | status = acpi_walk_namespace(ACPI_TYPE_DEVICE, handle, 1, | 945 | status = acpi_walk_namespace(ACPI_TYPE_DEVICE, handle, 1, |
| 940 | register_slot, NULL, bridge, NULL); | 946 | acpiphp_add_context, NULL, bridge, NULL); |
| 941 | if (ACPI_FAILURE(status)) { | 947 | if (ACPI_FAILURE(status)) { |
| 942 | acpi_handle_err(handle, "failed to register slots\n"); | 948 | acpi_handle_err(handle, "failed to register slots\n"); |
| 943 | cleanup_bridge(bridge); | 949 | cleanup_bridge(bridge); |
