diff options
author | Lv Zheng <lv.zheng@intel.com> | 2013-10-30 21:31:24 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-10-31 09:37:36 -0400 |
commit | 45c9f78b25ad9ce6cdf259ac4b652e6783adcb23 (patch) | |
tree | 1bfbffe12dca603ba2b6474f9e66a19656275c34 /drivers/acpi | |
parent | 40bce100cafb945f1fb5475a70628b4379c74f38 (diff) |
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: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/acpica/tbutils.c | 3 | ||||
-rw-r--r-- | drivers/acpi/acpica/tbxface.c | 2 | ||||
-rw-r--r-- | drivers/acpi/acpica/tbxfload.c | 2 | ||||
-rw-r--r-- | drivers/acpi/acpica/tbxfroot.c | 2 | ||||
-rw-r--r-- | drivers/acpi/acpica/utxface.c | 2 | ||||
-rw-r--r-- | drivers/acpi/acpica/utxfinit.c | 6 |
6 files changed, 8 insertions, 9 deletions
diff --git a/drivers/acpi/acpica/tbutils.c b/drivers/acpi/acpica/tbutils.c index 43ffe21c7b26..3d6bb83aa7e7 100644 --- a/drivers/acpi/acpica/tbutils.c +++ b/drivers/acpi/acpica/tbutils.c | |||
@@ -430,8 +430,7 @@ acpi_tb_get_root_table_entry(u8 *table_entry, u32 table_entry_size) | |||
430 | * | 430 | * |
431 | ******************************************************************************/ | 431 | ******************************************************************************/ |
432 | 432 | ||
433 | acpi_status __init | 433 | acpi_status __init acpi_tb_parse_root_table(acpi_physical_address rsdp_address) |
434 | acpi_tb_parse_root_table(acpi_physical_address rsdp_address) | ||
435 | { | 434 | { |
436 | struct acpi_table_rsdp *rsdp; | 435 | struct acpi_table_rsdp *rsdp; |
437 | u32 table_entry_size; | 436 | u32 table_entry_size; |
diff --git a/drivers/acpi/acpica/tbxface.c b/drivers/acpi/acpica/tbxface.c index 7e63090742dc..db826eaadd1c 100644 --- a/drivers/acpi/acpica/tbxface.c +++ b/drivers/acpi/acpica/tbxface.c | |||
@@ -164,7 +164,7 @@ ACPI_EXPORT_SYMBOL_INIT(acpi_initialize_tables) | |||
164 | * kernel. | 164 | * kernel. |
165 | * | 165 | * |
166 | ******************************************************************************/ | 166 | ******************************************************************************/ |
167 | acpi_status acpi_reallocate_root_table(void) | 167 | acpi_status __init acpi_reallocate_root_table(void) |
168 | { | 168 | { |
169 | acpi_status status; | 169 | acpi_status status; |
170 | 170 | ||
diff --git a/drivers/acpi/acpica/tbxfload.c b/drivers/acpi/acpica/tbxfload.c index b1e1edd5703a..60b5a871833c 100644 --- a/drivers/acpi/acpica/tbxfload.c +++ b/drivers/acpi/acpica/tbxfload.c | |||
@@ -66,7 +66,7 @@ static acpi_status acpi_tb_load_namespace(void); | |||
66 | * | 66 | * |
67 | ******************************************************************************/ | 67 | ******************************************************************************/ |
68 | 68 | ||
69 | acpi_status acpi_load_tables(void) | 69 | acpi_status __init acpi_load_tables(void) |
70 | { | 70 | { |
71 | acpi_status status; | 71 | acpi_status status; |
72 | 72 | ||
diff --git a/drivers/acpi/acpica/tbxfroot.c b/drivers/acpi/acpica/tbxfroot.c index 1c95fabbe6a4..e4e1468877c3 100644 --- a/drivers/acpi/acpica/tbxfroot.c +++ b/drivers/acpi/acpica/tbxfroot.c | |||
@@ -111,7 +111,7 @@ acpi_status acpi_tb_validate_rsdp(struct acpi_table_rsdp *rsdp) | |||
111 | * | 111 | * |
112 | ******************************************************************************/ | 112 | ******************************************************************************/ |
113 | 113 | ||
114 | acpi_status acpi_find_root_pointer(acpi_size *table_address) | 114 | acpi_status __init acpi_find_root_pointer(acpi_size *table_address) |
115 | { | 115 | { |
116 | u8 *table_ptr; | 116 | u8 *table_ptr; |
117 | u8 *mem_rover; | 117 | u8 *mem_rover; |
diff --git a/drivers/acpi/acpica/utxface.c b/drivers/acpi/acpica/utxface.c index 39869022a417..be322c83643a 100644 --- a/drivers/acpi/acpica/utxface.c +++ b/drivers/acpi/acpica/utxface.c | |||
@@ -61,7 +61,7 @@ ACPI_MODULE_NAME("utxface") | |||
61 | * DESCRIPTION: Shutdown the ACPICA subsystem and release all resources. | 61 | * DESCRIPTION: Shutdown the ACPICA subsystem and release all resources. |
62 | * | 62 | * |
63 | ******************************************************************************/ | 63 | ******************************************************************************/ |
64 | acpi_status acpi_terminate(void) | 64 | acpi_status __init acpi_terminate(void) |
65 | { | 65 | { |
66 | acpi_status status; | 66 | acpi_status status; |
67 | 67 | ||
diff --git a/drivers/acpi/acpica/utxfinit.c b/drivers/acpi/acpica/utxfinit.c index ff6f4d194136..75efea0539c1 100644 --- a/drivers/acpi/acpica/utxfinit.c +++ b/drivers/acpi/acpica/utxfinit.c | |||
@@ -65,7 +65,7 @@ ACPI_MODULE_NAME("utxfinit") | |||
65 | * called, so any early initialization belongs here. | 65 | * called, so any early initialization belongs here. |
66 | * | 66 | * |
67 | ******************************************************************************/ | 67 | ******************************************************************************/ |
68 | acpi_status acpi_initialize_subsystem(void) | 68 | acpi_status __init acpi_initialize_subsystem(void) |
69 | { | 69 | { |
70 | acpi_status status; | 70 | acpi_status status; |
71 | 71 | ||
@@ -140,7 +140,7 @@ ACPI_EXPORT_SYMBOL_INIT(acpi_initialize_subsystem) | |||
140 | * Puts system into ACPI mode if it isn't already. | 140 | * Puts system into ACPI mode if it isn't already. |
141 | * | 141 | * |
142 | ******************************************************************************/ | 142 | ******************************************************************************/ |
143 | acpi_status acpi_enable_subsystem(u32 flags) | 143 | acpi_status __init acpi_enable_subsystem(u32 flags) |
144 | { | 144 | { |
145 | acpi_status status = AE_OK; | 145 | acpi_status status = AE_OK; |
146 | 146 | ||
@@ -245,7 +245,7 @@ ACPI_EXPORT_SYMBOL_INIT(acpi_enable_subsystem) | |||
245 | * objects and executing AML code for Regions, buffers, etc. | 245 | * objects and executing AML code for Regions, buffers, etc. |
246 | * | 246 | * |
247 | ******************************************************************************/ | 247 | ******************************************************************************/ |
248 | acpi_status acpi_initialize_objects(u32 flags) | 248 | acpi_status __init acpi_initialize_objects(u32 flags) |
249 | { | 249 | { |
250 | acpi_status status = AE_OK; | 250 | acpi_status status = AE_OK; |
251 | 251 | ||