summaryrefslogtreecommitdiff
path: root/drivers/acpi/acpica/exconfig.c
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2016-11-30 10:21:26 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-12-01 16:28:22 +0300
commit170564d90b2e1fee4c85adc691f5b9c92e7813ea (patch)
tree08be2df5041aca3227594a1a4b9535f5c1b1efc8 /drivers/acpi/acpica/exconfig.c
parent42cc87a55b0524b0ed178dd7949c52f9750711bc (diff)
downloadlinux-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/exconfig.c')
-rw-r--r--drivers/acpi/acpica/exconfig.c35
1 files changed, 1 insertions, 34 deletions
diff --git a/drivers/acpi/acpica/exconfig.c b/drivers/acpi/acpica/exconfig.c
index 8b8d620e2656..c32c7829878a 100644
--- a/drivers/acpi/acpica/exconfig.c
+++ b/drivers/acpi/acpica/exconfig.c
@@ -499,7 +499,6 @@ acpi_status acpi_ex_unload_table(union acpi_operand_object *ddb_handle)
acpi_status status = AE_OK;
union acpi_operand_object *table_desc = ddb_handle;
u32 table_index;
- struct acpi_table_header *table;
ACPI_FUNCTION_TRACE(ex_unload_table);
@@ -536,39 +535,7 @@ acpi_status acpi_ex_unload_table(union acpi_operand_object *ddb_handle)
* strict order requirement against it.
*/
acpi_ex_exit_interpreter();
-
- /* Ensure the table is still loaded */
-
- if (!acpi_tb_is_table_loaded(table_index)) {
- status = AE_NOT_EXIST;
- goto lock_and_exit;
- }
-
- /* Invoke table handler if present */
-
- if (acpi_gbl_table_handler) {
- status = acpi_get_table_by_index(table_index, &table);
- if (ACPI_SUCCESS(status)) {
- (void)acpi_gbl_table_handler(ACPI_TABLE_EVENT_UNLOAD,
- table,
- acpi_gbl_table_handler_context);
- }
- }
-
- /* Delete the portion of the namespace owned by this table */
-
- status = acpi_tb_delete_namespace_by_owner(table_index);
- if (ACPI_FAILURE(status)) {
- goto lock_and_exit;
- }
-
- (void)acpi_tb_release_owner_id(table_index);
- acpi_tb_set_table_loaded_flag(table_index, FALSE);
-
-lock_and_exit:
-
- /* Re-acquire the interpreter lock */
-
+ status = acpi_tb_unload_table(table_index);
acpi_ex_enter_interpreter();
/*