diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-02-15 18:12:00 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-02-15 18:12:00 -0500 |
commit | 3799c5a032aefb258e2a19dfdb1e3780b78ee3ad (patch) | |
tree | 29443b97ee7416918d2f1fc6012e12dd443ba4de | |
parent | 4b49b9fe2b5220374ddc1c122cc31e00cc20365f (diff) |
ACPI / hotplug / PCI: Rename register_slot() to acpiphp_add_context()
The name of register_slot() doesn't really reflect what the function
is does, so rename it to acpiphp_add_context() and add a proper
kerneldoc comment to it.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-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); |