diff options
author | Lv Zheng <lv.zheng@intel.com> | 2016-11-30 10:21:19 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-12-01 16:28:22 +0300 |
commit | 42cc87a55b0524b0ed178dd7949c52f9750711bc (patch) | |
tree | 42445cada946ee7a6955c3ab42c8e479327327af /drivers/acpi/acpica/tbdata.c | |
parent | 760235cd6ca8ae0d7509055d75a0f1d8b3c60668 (diff) | |
download | linux-42cc87a55b0524b0ed178dd7949c52f9750711bc.tar.xz |
ACPICA: Tables: Cleanup acpi_tb_install_and_load_table()
ACPICA commit 7fdac0289faa1c28b91413c8e394e87372aa69e6
acpi_tb_install_and_load_table() can invoke acpi_tb_load_table() to eliminate
redundant code.
No functional change. Lv Zheng.
Link: https://github.com/acpica/acpica/commit/7fdac028
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/tbdata.c')
-rw-r--r-- | drivers/acpi/acpica/tbdata.c | 45 |
1 files changed, 5 insertions, 40 deletions
diff --git a/drivers/acpi/acpica/tbdata.c b/drivers/acpi/acpica/tbdata.c index d9ca8c2aa2d3..4cbfa30b6c05 100644 --- a/drivers/acpi/acpica/tbdata.c +++ b/drivers/acpi/acpica/tbdata.c @@ -832,9 +832,9 @@ acpi_tb_load_table(u32 table_index, struct acpi_namespace_node *parent_node) * * FUNCTION: acpi_tb_install_and_load_table * - * PARAMETERS: table - Pointer to the table - * address - Physical address of the table + * PARAMETERS: address - Physical address of the table * flags - Allocation flags of the table + * override - Whether override should be performed * table_index - Where table index is returned * * RETURN: Status @@ -844,15 +844,13 @@ acpi_tb_load_table(u32 table_index, struct acpi_namespace_node *parent_node) ******************************************************************************/ acpi_status -acpi_tb_install_and_load_table(struct acpi_table_header *table, - acpi_physical_address address, +acpi_tb_install_and_load_table(acpi_physical_address address, u8 flags, u8 override, u32 *table_index) { acpi_status status; u32 i; - acpi_owner_id owner_id; - ACPI_FUNCTION_TRACE(acpi_load_table); + ACPI_FUNCTION_TRACE(tb_install_and_load_table); (void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES); @@ -864,41 +862,8 @@ acpi_tb_install_and_load_table(struct acpi_table_header *table, goto unlock_and_exit; } - /* - * Note: Now table is "INSTALLED", it must be validated before - * using. - */ - status = acpi_tb_validate_table(&acpi_gbl_root_table_list.tables[i]); - if (ACPI_FAILURE(status)) { - goto unlock_and_exit; - } - (void)acpi_ut_release_mutex(ACPI_MTX_TABLES); - status = acpi_ns_load_table(i, acpi_gbl_root_node); - - /* Execute any module-level code that was found in the table */ - - if (!acpi_gbl_parse_table_as_term_list - && acpi_gbl_group_module_level_code) { - acpi_ns_exec_module_code_list(); - } - - /* - * Update GPEs for any new _Lxx/_Exx methods. Ignore errors. The host is - * responsible for discovering any new wake GPEs by running _PRW methods - * that may have been loaded by this table. - */ - status = acpi_tb_get_owner_id(i, &owner_id); - if (ACPI_SUCCESS(status)) { - acpi_ev_update_gpes(owner_id); - } - - /* Invoke table handler if present */ - - if (acpi_gbl_table_handler) { - (void)acpi_gbl_table_handler(ACPI_TABLE_EVENT_LOAD, table, - acpi_gbl_table_handler_context); - } + status = acpi_tb_load_table(i, acpi_gbl_root_node); (void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES); unlock_and_exit: |