提交 45c9f78b 编写于 作者: L Lv Zheng 提交者: Rafael J. Wysocki

ACPICA: Add __init for ACPICA initializers/finalizers.

This patch adds __init to the ACPICA documented initializers:
  acpi_initialize_tables()
  acpi_initialize_subsystem()
  acpi_load_tables()
  acpi_enable_subsystem()
  acpi_initialize_objects()
and to acpi_reallocate_root_table(), acpi_find_root_pointer() which
are also meant to be called only during initialization.

This patch adds __init to the ACPICA documented finalizer:
  acpi_terminate()
as this finalizer is only called in __init function now.

This change helps to reduce source code differences between
ACPICA upstream and Linux.

[rjw: Changelog]
Signed-off-by: NLv Zheng <lv.zheng@intel.com>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 40bce100
......@@ -430,8 +430,7 @@ acpi_tb_get_root_table_entry(u8 *table_entry, u32 table_entry_size)
*
******************************************************************************/
acpi_status __init
acpi_tb_parse_root_table(acpi_physical_address rsdp_address)
acpi_status __init acpi_tb_parse_root_table(acpi_physical_address rsdp_address)
{
struct acpi_table_rsdp *rsdp;
u32 table_entry_size;
......
......@@ -164,7 +164,7 @@ ACPI_EXPORT_SYMBOL_INIT(acpi_initialize_tables)
* kernel.
*
******************************************************************************/
acpi_status acpi_reallocate_root_table(void)
acpi_status __init acpi_reallocate_root_table(void)
{
acpi_status status;
......
......@@ -66,7 +66,7 @@ static acpi_status acpi_tb_load_namespace(void);
*
******************************************************************************/
acpi_status acpi_load_tables(void)
acpi_status __init acpi_load_tables(void)
{
acpi_status status;
......
......@@ -111,7 +111,7 @@ acpi_status acpi_tb_validate_rsdp(struct acpi_table_rsdp *rsdp)
*
******************************************************************************/
acpi_status acpi_find_root_pointer(acpi_size *table_address)
acpi_status __init acpi_find_root_pointer(acpi_size *table_address)
{
u8 *table_ptr;
u8 *mem_rover;
......
......@@ -61,7 +61,7 @@ ACPI_MODULE_NAME("utxface")
* DESCRIPTION: Shutdown the ACPICA subsystem and release all resources.
*
******************************************************************************/
acpi_status acpi_terminate(void)
acpi_status __init acpi_terminate(void)
{
acpi_status status;
......
......@@ -65,7 +65,7 @@ ACPI_MODULE_NAME("utxfinit")
* called, so any early initialization belongs here.
*
******************************************************************************/
acpi_status acpi_initialize_subsystem(void)
acpi_status __init acpi_initialize_subsystem(void)
{
acpi_status status;
......@@ -140,7 +140,7 @@ ACPI_EXPORT_SYMBOL_INIT(acpi_initialize_subsystem)
* Puts system into ACPI mode if it isn't already.
*
******************************************************************************/
acpi_status acpi_enable_subsystem(u32 flags)
acpi_status __init acpi_enable_subsystem(u32 flags)
{
acpi_status status = AE_OK;
......@@ -245,7 +245,7 @@ ACPI_EXPORT_SYMBOL_INIT(acpi_enable_subsystem)
* objects and executing AML code for Regions, buffers, etc.
*
******************************************************************************/
acpi_status acpi_initialize_objects(u32 flags)
acpi_status __init acpi_initialize_objects(u32 flags)
{
acpi_status status = AE_OK;
......
......@@ -114,17 +114,17 @@ extern u8 acpi_gbl_disable_ssdt_table_load;
/*
* Initialization
*/
acpi_status
acpi_status __init
acpi_initialize_tables(struct acpi_table_desc *initial_storage,
u32 initial_table_count, u8 allow_resize);
acpi_status __init acpi_initialize_subsystem(void);
acpi_status acpi_enable_subsystem(u32 flags);
acpi_status __init acpi_enable_subsystem(u32 flags);
acpi_status acpi_initialize_objects(u32 flags);
acpi_status __init acpi_initialize_objects(u32 flags);
acpi_status acpi_terminate(void);
acpi_status __init acpi_terminate(void);
/*
* Miscellaneous global interfaces
......@@ -168,14 +168,14 @@ acpi_status acpi_load_table(struct acpi_table_header *table);
acpi_status acpi_unload_parent_table(acpi_handle object);
acpi_status acpi_load_tables(void);
acpi_status __init acpi_load_tables(void);
/*
* ACPI table manipulation interfaces
*/
acpi_status acpi_reallocate_root_table(void);
acpi_status __init acpi_reallocate_root_table(void);
acpi_status acpi_find_root_pointer(acpi_size * rsdp_address);
acpi_status __init acpi_find_root_pointer(acpi_size *rsdp_address);
acpi_status acpi_unload_table_id(acpi_owner_id id);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册