diff options
author | Lv Zheng <lv.zheng@intel.com> | 2016-11-30 10:21:26 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-12-01 16:28:22 +0300 |
commit | 170564d90b2e1fee4c85adc691f5b9c92e7813ea (patch) | |
tree | 08be2df5041aca3227594a1a4b9535f5c1b1efc8 /drivers/acpi/acpica/tbxfload.c | |
parent | 42cc87a55b0524b0ed178dd7949c52f9750711bc (diff) | |
download | linux-170564d90b2e1fee4c85adc691f5b9c92e7813ea.tar.xz |
ACPICA: Tables: Add acpi_tb_unload_table()
ACPICA commit 80e24663b212daac0c32767fdbd8a46892292f1f
This patch introduces acpi_tb_unload_table() to eliminate redundant code from
acpi_ex_unload_table() and acpi_unload_parent_table().
No functional change. Lv Zheng.
Link: https://github.com/acpica/acpica/commit/80e24663
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/tbxfload.c')
-rw-r--r-- | drivers/acpi/acpica/tbxfload.c | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/drivers/acpi/acpica/tbxfload.c b/drivers/acpi/acpica/tbxfload.c index 77de33b76c85..82019c01a0e5 100644 --- a/drivers/acpi/acpica/tbxfload.c +++ b/drivers/acpi/acpica/tbxfload.c @@ -408,37 +408,8 @@ acpi_status acpi_unload_parent_table(acpi_handle object) break; } - /* Ensure the table is actually loaded */ - (void)acpi_ut_release_mutex(ACPI_MTX_TABLES); - if (!acpi_tb_is_table_loaded(i)) { - status = AE_NOT_EXIST; - (void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES); - break; - } - - /* Invoke table handler if present */ - - if (acpi_gbl_table_handler) { - (void)acpi_gbl_table_handler(ACPI_TABLE_EVENT_UNLOAD, - acpi_gbl_root_table_list. - tables[i].pointer, - acpi_gbl_table_handler_context); - } - - /* - * Delete all namespace objects owned by this table. Note that - * these objects can appear anywhere in the namespace by virtue - * of the AML "Scope" operator. Thus, we need to track ownership - * by an ID, not simply a position within the hierarchy. - */ - status = acpi_tb_delete_namespace_by_owner(i); - if (ACPI_FAILURE(status)) { - break; - } - - status = acpi_tb_release_owner_id(i); - acpi_tb_set_table_loaded_flag(i, FALSE); + status = acpi_tb_unload_table(i); (void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES); break; } |