aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/acpiphp_glue.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-02-03 18:42:20 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-02-05 11:41:10 -0500
commitd3a1ebb063cc45d5f4a5655534b87c3547fd9bbf (patch)
tree29e016cfe6ffb6a65c32f40f521ee253b728dcb2 /drivers/pci/hotplug/acpiphp_glue.c
parent1d4a5b610e500fe860570db4ceb64e45255221ab (diff)
ACPI / hotplug / PCI: Do not pass ACPI handle to hotplug_event()
Since hotplug_event() can get the ACPI handle needed for debug printouts from its context argument, there's no need to pass the handle to it. Moreover, the second argument's type may be changed to (struct acpiphp_context *), because that's what is always passed to hotplug_event() as the second argument anyway. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/pci/hotplug/acpiphp_glue.c')
-rw-r--r--drivers/pci/hotplug/acpiphp_glue.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c
index 64ad6eed983f..5da32eff3bc3 100644
--- a/drivers/pci/hotplug/acpiphp_glue.c
+++ b/drivers/pci/hotplug/acpiphp_glue.c
@@ -63,7 +63,7 @@ static DEFINE_MUTEX(acpiphp_context_lock);
63static void handle_hotplug_event(acpi_handle handle, u32 type, void *data); 63static void handle_hotplug_event(acpi_handle handle, u32 type, void *data);
64static void acpiphp_sanitize_bus(struct pci_bus *bus); 64static void acpiphp_sanitize_bus(struct pci_bus *bus);
65static void acpiphp_set_hpp_values(struct pci_bus *bus); 65static void acpiphp_set_hpp_values(struct pci_bus *bus);
66static void hotplug_event(acpi_handle handle, u32 type, void *data); 66static void hotplug_event(u32 type, struct acpiphp_context *context);
67static void free_bridge(struct kref *kref); 67static void free_bridge(struct kref *kref);
68 68
69static void acpiphp_context_handler(acpi_handle handle, void *context) 69static void acpiphp_context_handler(acpi_handle handle, void *context)
@@ -225,7 +225,7 @@ static void dock_event(acpi_handle handle, u32 type, void *data)
225 acpiphp_put_context(context); 225 acpiphp_put_context(context);
226 mutex_unlock(&acpiphp_context_lock); 226 mutex_unlock(&acpiphp_context_lock);
227 227
228 hotplug_event(handle, type, data); 228 hotplug_event(type, context);
229 229
230 put_bridge(context->func.parent); 230 put_bridge(context->func.parent);
231} 231}
@@ -813,9 +813,9 @@ void acpiphp_check_host_bridge(acpi_handle handle)
813 813
814static int acpiphp_disable_and_eject_slot(struct acpiphp_slot *slot); 814static int acpiphp_disable_and_eject_slot(struct acpiphp_slot *slot);
815 815
816static void hotplug_event(acpi_handle handle, u32 type, void *data) 816static void hotplug_event(u32 type, struct acpiphp_context *context)
817{ 817{
818 struct acpiphp_context *context = data; 818 acpi_handle handle = context->adev->handle;
819 struct acpiphp_func *func = &context->func; 819 struct acpiphp_func *func = &context->func;
820 struct acpiphp_slot *slot = func->slot; 820 struct acpiphp_slot *slot = func->slot;
821 struct acpiphp_bridge *bridge; 821 struct acpiphp_bridge *bridge;
@@ -870,14 +870,14 @@ static void hotplug_event(acpi_handle handle, u32 type, void *data)
870static void hotplug_event_work(void *data, u32 type) 870static void hotplug_event_work(void *data, u32 type)
871{ 871{
872 struct acpiphp_context *context = data; 872 struct acpiphp_context *context = data;
873 acpi_handle handle = context->adev->handle;
874 873
875 acpi_scan_lock_acquire(); 874 acpi_scan_lock_acquire();
876 875
877 hotplug_event(handle, type, context); 876 hotplug_event(type, context);
878 877
879 acpi_scan_lock_release(); 878 acpi_scan_lock_release();
880 acpi_evaluate_hotplug_ost(handle, type, ACPI_OST_SC_SUCCESS, NULL); 879 acpi_evaluate_hotplug_ost(context->adev->handle, type,
880 ACPI_OST_SC_SUCCESS, NULL);
881 put_bridge(context->func.parent); 881 put_bridge(context->func.parent);
882} 882}
883 883