diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-11-07 13:31:15 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-11-07 13:31:15 -0500 |
commit | 63ff4d0765a4e30afa659edbf09006987fc62499 (patch) | |
tree | fb9f64c4510ea08e076c715c87dd61b3d79f99d6 /drivers/pci/hotplug/acpiphp_glue.c | |
parent | 679d9980f9914136f6e488d976eb412de156c542 (diff) | |
parent | 7b98118aaa5d75644c48f41fc5d0cc181e478383 (diff) |
Merge branch 'acpi-hotplug'
* acpi-hotplug:
ACPI / hotplug: Consolidate deferred execution of ACPI hotplug routines
ACPI / hotplug: Do not execute "insert in progress" _OST
ACPI / hotplug: Carry out PCI root eject directly
ACPI / hotplug: Merge device hot-removal routines
ACPI / hotplug: Make acpi_bus_hot_remove_device() internal
ACPI / hotplug: Simplify device ejection routines
ACPI / hotplug: Fix handle_root_bridge_removal()
ACPI / hotplug: Refuse to hot-remove all objects with disabled hotplug
ACPI / scan: Start matching drivers after trying scan handlers
ACPI: Remove acpi_pci_slot_init() headers from internal.h
Conflicts:
include/acpi/acpiosxf.h (with the 'acpica' branch)
Diffstat (limited to 'drivers/pci/hotplug/acpiphp_glue.c')
-rw-r--r-- | drivers/pci/hotplug/acpiphp_glue.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c index be12fbfcae10..e98018b43e2a 100644 --- a/drivers/pci/hotplug/acpiphp_glue.c +++ b/drivers/pci/hotplug/acpiphp_glue.c | |||
@@ -875,21 +875,17 @@ static void hotplug_event(acpi_handle handle, u32 type, void *data) | |||
875 | put_bridge(bridge); | 875 | put_bridge(bridge); |
876 | } | 876 | } |
877 | 877 | ||
878 | static void hotplug_event_work(struct work_struct *work) | 878 | static void hotplug_event_work(void *data, u32 type) |
879 | { | 879 | { |
880 | struct acpiphp_context *context; | 880 | struct acpiphp_context *context = data; |
881 | struct acpi_hp_work *hp_work; | 881 | acpi_handle handle = context->handle; |
882 | 882 | ||
883 | hp_work = container_of(work, struct acpi_hp_work, work); | ||
884 | context = hp_work->context; | ||
885 | acpi_scan_lock_acquire(); | 883 | acpi_scan_lock_acquire(); |
886 | 884 | ||
887 | hotplug_event(hp_work->handle, hp_work->type, context); | 885 | hotplug_event(handle, type, context); |
888 | 886 | ||
889 | acpi_scan_lock_release(); | 887 | acpi_scan_lock_release(); |
890 | acpi_evaluate_hotplug_ost(hp_work->handle, hp_work->type, | 888 | acpi_evaluate_hotplug_ost(handle, type, ACPI_OST_SC_SUCCESS, NULL); |
891 | ACPI_OST_SC_SUCCESS, NULL); | ||
892 | kfree(hp_work); /* allocated in handle_hotplug_event() */ | ||
893 | put_bridge(context->func.parent); | 889 | put_bridge(context->func.parent); |
894 | } | 890 | } |
895 | 891 | ||
@@ -940,10 +936,10 @@ static void handle_hotplug_event(acpi_handle handle, u32 type, void *data) | |||
940 | 936 | ||
941 | mutex_lock(&acpiphp_context_lock); | 937 | mutex_lock(&acpiphp_context_lock); |
942 | context = acpiphp_get_context(handle); | 938 | context = acpiphp_get_context(handle); |
943 | if (context) { | 939 | if (context && !WARN_ON(context->handle != handle)) { |
944 | get_bridge(context->func.parent); | 940 | get_bridge(context->func.parent); |
945 | acpiphp_put_context(context); | 941 | acpiphp_put_context(context); |
946 | alloc_acpi_hp_work(handle, type, context, hotplug_event_work); | 942 | acpi_hotplug_execute(hotplug_event_work, context, type); |
947 | mutex_unlock(&acpiphp_context_lock); | 943 | mutex_unlock(&acpiphp_context_lock); |
948 | return; | 944 | return; |
949 | } | 945 | } |