diff options
65 files changed, 367 insertions, 363 deletions
diff --git a/drivers/acpi/dispatcher/dsmthdat.c b/drivers/acpi/dispatcher/dsmthdat.c index f7cb5170aa11..2ed48439835d 100644 --- a/drivers/acpi/dispatcher/dsmthdat.c +++ b/drivers/acpi/dispatcher/dsmthdat.c | |||
@@ -81,7 +81,7 @@ acpi_ds_method_data_get_type(u16 opcode, | |||
81 | * special data types. | 81 | * special data types. |
82 | * | 82 | * |
83 | * NOTES: walk_state fields are initialized to zero by the | 83 | * NOTES: walk_state fields are initialized to zero by the |
84 | * ACPI_MEM_CALLOCATE(). | 84 | * ACPI_ALLOCATE_ZEROED(). |
85 | * | 85 | * |
86 | * A pseudo-Namespace Node is assigned to each argument and local | 86 | * A pseudo-Namespace Node is assigned to each argument and local |
87 | * so that ref_of() can return a pointer to the Node. | 87 | * so that ref_of() can return a pointer to the Node. |
diff --git a/drivers/acpi/dispatcher/dsobject.c b/drivers/acpi/dispatcher/dsobject.c index 1f2d0c6ef36c..ce54715f13ad 100644 --- a/drivers/acpi/dispatcher/dsobject.c +++ b/drivers/acpi/dispatcher/dsobject.c | |||
@@ -245,7 +245,7 @@ acpi_ds_build_internal_buffer_obj(struct acpi_walk_state *walk_state, | |||
245 | "Buffer defined with zero length in AML, creating\n")); | 245 | "Buffer defined with zero length in AML, creating\n")); |
246 | } else { | 246 | } else { |
247 | obj_desc->buffer.pointer = | 247 | obj_desc->buffer.pointer = |
248 | ACPI_MEM_CALLOCATE(obj_desc->buffer.length); | 248 | ACPI_ALLOCATE_ZEROED(obj_desc->buffer.length); |
249 | if (!obj_desc->buffer.pointer) { | 249 | if (!obj_desc->buffer.pointer) { |
250 | acpi_ut_delete_object_desc(obj_desc); | 250 | acpi_ut_delete_object_desc(obj_desc); |
251 | return_ACPI_STATUS(AE_NO_MEMORY); | 251 | return_ACPI_STATUS(AE_NO_MEMORY); |
@@ -341,9 +341,10 @@ acpi_ds_build_internal_package_obj(struct acpi_walk_state *walk_state, | |||
341 | * individual objects). Add an extra pointer slot so | 341 | * individual objects). Add an extra pointer slot so |
342 | * that the list is always null terminated. | 342 | * that the list is always null terminated. |
343 | */ | 343 | */ |
344 | obj_desc->package.elements = ACPI_MEM_CALLOCATE(((acpi_size) obj_desc-> | 344 | obj_desc->package.elements = ACPI_ALLOCATE_ZEROED(((acpi_size) |
345 | package.count + | 345 | obj_desc->package. |
346 | 1) * sizeof(void *)); | 346 | count + |
347 | 1) * sizeof(void *)); | ||
347 | 348 | ||
348 | if (!obj_desc->package.elements) { | 349 | if (!obj_desc->package.elements) { |
349 | acpi_ut_delete_object_desc(obj_desc); | 350 | acpi_ut_delete_object_desc(obj_desc); |
diff --git a/drivers/acpi/dispatcher/dsutils.c b/drivers/acpi/dispatcher/dsutils.c index 3fbe17ebef5a..ab24aa88e2fa 100644 --- a/drivers/acpi/dispatcher/dsutils.c +++ b/drivers/acpi/dispatcher/dsutils.c | |||
@@ -577,7 +577,7 @@ acpi_ds_create_operand(struct acpi_walk_state *walk_state, | |||
577 | 577 | ||
578 | /* Free the namestring created above */ | 578 | /* Free the namestring created above */ |
579 | 579 | ||
580 | ACPI_MEM_FREE(name_string); | 580 | ACPI_FREE(name_string); |
581 | 581 | ||
582 | /* Check status from the lookup */ | 582 | /* Check status from the lookup */ |
583 | 583 | ||
diff --git a/drivers/acpi/dispatcher/dswload.c b/drivers/acpi/dispatcher/dswload.c index 02b03126e14e..1ad7870101fb 100644 --- a/drivers/acpi/dispatcher/dswload.c +++ b/drivers/acpi/dispatcher/dswload.c | |||
@@ -1113,7 +1113,6 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state) | |||
1113 | ACPI_NS_DONT_OPEN_SCOPE, walk_state, | 1113 | ACPI_NS_DONT_OPEN_SCOPE, walk_state, |
1114 | &(new_node)); | 1114 | &(new_node)); |
1115 | if (ACPI_SUCCESS(status)) { | 1115 | if (ACPI_SUCCESS(status)) { |
1116 | |||
1117 | /* | 1116 | /* |
1118 | * Make sure that what we found is indeed a method | 1117 | * Make sure that what we found is indeed a method |
1119 | * We didn't search for a method on purpose, to see if the name | 1118 | * We didn't search for a method on purpose, to see if the name |
diff --git a/drivers/acpi/dispatcher/dswstate.c b/drivers/acpi/dispatcher/dswstate.c index 5bc340b1b286..d2846ffc9773 100644 --- a/drivers/acpi/dispatcher/dswstate.c +++ b/drivers/acpi/dispatcher/dswstate.c | |||
@@ -66,7 +66,6 @@ void *acpi_ds_obj_stack_get_value(u32 index, | |||
66 | #endif | 66 | #endif |
67 | 67 | ||
68 | #ifdef ACPI_FUTURE_USAGE | 68 | #ifdef ACPI_FUTURE_USAGE |
69 | |||
70 | /******************************************************************************* | 69 | /******************************************************************************* |
71 | * | 70 | * |
72 | * FUNCTION: acpi_ds_result_remove | 71 | * FUNCTION: acpi_ds_result_remove |
@@ -128,7 +127,6 @@ acpi_ds_result_remove(union acpi_operand_object **object, | |||
128 | 127 | ||
129 | return (AE_OK); | 128 | return (AE_OK); |
130 | } | 129 | } |
131 | |||
132 | #endif /* ACPI_FUTURE_USAGE */ | 130 | #endif /* ACPI_FUTURE_USAGE */ |
133 | 131 | ||
134 | /******************************************************************************* | 132 | /******************************************************************************* |
@@ -645,7 +643,7 @@ struct acpi_walk_state *acpi_ds_create_walk_state(acpi_owner_id owner_id, | |||
645 | 643 | ||
646 | ACPI_FUNCTION_TRACE("ds_create_walk_state"); | 644 | ACPI_FUNCTION_TRACE("ds_create_walk_state"); |
647 | 645 | ||
648 | walk_state = ACPI_MEM_CALLOCATE(sizeof(struct acpi_walk_state)); | 646 | walk_state = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_walk_state)); |
649 | if (!walk_state) { | 647 | if (!walk_state) { |
650 | return_PTR(NULL); | 648 | return_PTR(NULL); |
651 | } | 649 | } |
@@ -668,7 +666,7 @@ struct acpi_walk_state *acpi_ds_create_walk_state(acpi_owner_id owner_id, | |||
668 | 666 | ||
669 | status = acpi_ds_result_stack_push(walk_state); | 667 | status = acpi_ds_result_stack_push(walk_state); |
670 | if (ACPI_FAILURE(status)) { | 668 | if (ACPI_FAILURE(status)) { |
671 | ACPI_MEM_FREE(walk_state); | 669 | ACPI_FREE(walk_state); |
672 | return_PTR(NULL); | 670 | return_PTR(NULL); |
673 | } | 671 | } |
674 | 672 | ||
@@ -859,7 +857,7 @@ void acpi_ds_delete_walk_state(struct acpi_walk_state *walk_state) | |||
859 | acpi_ut_delete_generic_state(state); | 857 | acpi_ut_delete_generic_state(state); |
860 | } | 858 | } |
861 | 859 | ||
862 | ACPI_MEM_FREE(walk_state); | 860 | ACPI_FREE(walk_state); |
863 | return_VOID; | 861 | return_VOID; |
864 | } | 862 | } |
865 | 863 | ||
diff --git a/drivers/acpi/events/evgpeblk.c b/drivers/acpi/events/evgpeblk.c index 87e77a138fff..e8e72986f0d6 100644 --- a/drivers/acpi/events/evgpeblk.c +++ b/drivers/acpi/events/evgpeblk.c | |||
@@ -207,7 +207,7 @@ acpi_ev_delete_gpe_handlers(struct acpi_gpe_xrupt_info *gpe_xrupt_info, | |||
207 | 207 | ||
208 | if ((gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK) == | 208 | if ((gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK) == |
209 | ACPI_GPE_DISPATCH_HANDLER) { | 209 | ACPI_GPE_DISPATCH_HANDLER) { |
210 | ACPI_MEM_FREE(gpe_event_info->dispatch.handler); | 210 | ACPI_FREE(gpe_event_info->dispatch.handler); |
211 | gpe_event_info->dispatch.handler = NULL; | 211 | gpe_event_info->dispatch.handler = NULL; |
212 | gpe_event_info->flags &= | 212 | gpe_event_info->flags &= |
213 | ~ACPI_GPE_DISPATCH_MASK; | 213 | ~ACPI_GPE_DISPATCH_MASK; |
@@ -504,7 +504,7 @@ static struct acpi_gpe_xrupt_info *acpi_ev_get_gpe_xrupt_block(u32 | |||
504 | 504 | ||
505 | /* Not found, must allocate a new xrupt descriptor */ | 505 | /* Not found, must allocate a new xrupt descriptor */ |
506 | 506 | ||
507 | gpe_xrupt = ACPI_MEM_CALLOCATE(sizeof(struct acpi_gpe_xrupt_info)); | 507 | gpe_xrupt = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_gpe_xrupt_info)); |
508 | if (!gpe_xrupt) { | 508 | if (!gpe_xrupt) { |
509 | return_PTR(NULL); | 509 | return_PTR(NULL); |
510 | } | 510 | } |
@@ -595,7 +595,7 @@ acpi_ev_delete_gpe_xrupt(struct acpi_gpe_xrupt_info *gpe_xrupt) | |||
595 | 595 | ||
596 | /* Free the block */ | 596 | /* Free the block */ |
597 | 597 | ||
598 | ACPI_MEM_FREE(gpe_xrupt); | 598 | ACPI_FREE(gpe_xrupt); |
599 | return_ACPI_STATUS(AE_OK); | 599 | return_ACPI_STATUS(AE_OK); |
600 | } | 600 | } |
601 | 601 | ||
@@ -712,9 +712,9 @@ acpi_status acpi_ev_delete_gpe_block(struct acpi_gpe_block_info *gpe_block) | |||
712 | 712 | ||
713 | /* Free the gpe_block */ | 713 | /* Free the gpe_block */ |
714 | 714 | ||
715 | ACPI_MEM_FREE(gpe_block->register_info); | 715 | ACPI_FREE(gpe_block->register_info); |
716 | ACPI_MEM_FREE(gpe_block->event_info); | 716 | ACPI_FREE(gpe_block->event_info); |
717 | ACPI_MEM_FREE(gpe_block); | 717 | ACPI_FREE(gpe_block); |
718 | 718 | ||
719 | unlock_and_exit: | 719 | unlock_and_exit: |
720 | status = acpi_ut_release_mutex(ACPI_MTX_EVENTS); | 720 | status = acpi_ut_release_mutex(ACPI_MTX_EVENTS); |
@@ -748,10 +748,10 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block) | |||
748 | 748 | ||
749 | /* Allocate the GPE register information block */ | 749 | /* Allocate the GPE register information block */ |
750 | 750 | ||
751 | gpe_register_info = ACPI_MEM_CALLOCATE((acpi_size) gpe_block-> | 751 | gpe_register_info = ACPI_ALLOCATE_ZEROED((acpi_size) gpe_block-> |
752 | register_count * | 752 | register_count * |
753 | sizeof(struct | 753 | sizeof(struct |
754 | acpi_gpe_register_info)); | 754 | acpi_gpe_register_info)); |
755 | if (!gpe_register_info) { | 755 | if (!gpe_register_info) { |
756 | ACPI_ERROR((AE_INFO, | 756 | ACPI_ERROR((AE_INFO, |
757 | "Could not allocate the gpe_register_info table")); | 757 | "Could not allocate the gpe_register_info table")); |
@@ -762,10 +762,11 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block) | |||
762 | * Allocate the GPE event_info block. There are eight distinct GPEs | 762 | * Allocate the GPE event_info block. There are eight distinct GPEs |
763 | * per register. Initialization to zeros is sufficient. | 763 | * per register. Initialization to zeros is sufficient. |
764 | */ | 764 | */ |
765 | gpe_event_info = ACPI_MEM_CALLOCATE(((acpi_size) gpe_block-> | 765 | gpe_event_info = ACPI_ALLOCATE_ZEROED(((acpi_size) gpe_block-> |
766 | register_count * | 766 | register_count * |
767 | ACPI_GPE_REGISTER_WIDTH) * | 767 | ACPI_GPE_REGISTER_WIDTH) * |
768 | sizeof(struct acpi_gpe_event_info)); | 768 | sizeof(struct |
769 | acpi_gpe_event_info)); | ||
769 | if (!gpe_event_info) { | 770 | if (!gpe_event_info) { |
770 | ACPI_ERROR((AE_INFO, | 771 | ACPI_ERROR((AE_INFO, |
771 | "Could not allocate the gpe_event_info table")); | 772 | "Could not allocate the gpe_event_info table")); |
@@ -848,10 +849,10 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block) | |||
848 | 849 | ||
849 | error_exit: | 850 | error_exit: |
850 | if (gpe_register_info) { | 851 | if (gpe_register_info) { |
851 | ACPI_MEM_FREE(gpe_register_info); | 852 | ACPI_FREE(gpe_register_info); |
852 | } | 853 | } |
853 | if (gpe_event_info) { | 854 | if (gpe_event_info) { |
854 | ACPI_MEM_FREE(gpe_event_info); | 855 | ACPI_FREE(gpe_event_info); |
855 | } | 856 | } |
856 | 857 | ||
857 | return_ACPI_STATUS(status); | 858 | return_ACPI_STATUS(status); |
@@ -895,7 +896,7 @@ acpi_ev_create_gpe_block(struct acpi_namespace_node *gpe_device, | |||
895 | 896 | ||
896 | /* Allocate a new GPE block */ | 897 | /* Allocate a new GPE block */ |
897 | 898 | ||
898 | gpe_block = ACPI_MEM_CALLOCATE(sizeof(struct acpi_gpe_block_info)); | 899 | gpe_block = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_gpe_block_info)); |
899 | if (!gpe_block) { | 900 | if (!gpe_block) { |
900 | return_ACPI_STATUS(AE_NO_MEMORY); | 901 | return_ACPI_STATUS(AE_NO_MEMORY); |
901 | } | 902 | } |
@@ -915,7 +916,7 @@ acpi_ev_create_gpe_block(struct acpi_namespace_node *gpe_device, | |||
915 | */ | 916 | */ |
916 | status = acpi_ev_create_gpe_info_blocks(gpe_block); | 917 | status = acpi_ev_create_gpe_info_blocks(gpe_block); |
917 | if (ACPI_FAILURE(status)) { | 918 | if (ACPI_FAILURE(status)) { |
918 | ACPI_MEM_FREE(gpe_block); | 919 | ACPI_FREE(gpe_block); |
919 | return_ACPI_STATUS(status); | 920 | return_ACPI_STATUS(status); |
920 | } | 921 | } |
921 | 922 | ||
@@ -923,7 +924,7 @@ acpi_ev_create_gpe_block(struct acpi_namespace_node *gpe_device, | |||
923 | 924 | ||
924 | status = acpi_ev_install_gpe_block(gpe_block, interrupt_number); | 925 | status = acpi_ev_install_gpe_block(gpe_block, interrupt_number); |
925 | if (ACPI_FAILURE(status)) { | 926 | if (ACPI_FAILURE(status)) { |
926 | ACPI_MEM_FREE(gpe_block); | 927 | ACPI_FREE(gpe_block); |
927 | return_ACPI_STATUS(status); | 928 | return_ACPI_STATUS(status); |
928 | } | 929 | } |
929 | 930 | ||
diff --git a/drivers/acpi/events/evregion.c b/drivers/acpi/events/evregion.c index b831ec4bcae7..2b900ef05fa9 100644 --- a/drivers/acpi/events/evregion.c +++ b/drivers/acpi/events/evregion.c | |||
@@ -366,7 +366,7 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj, | |||
366 | 366 | ||
367 | /* The handler for this region was already installed */ | 367 | /* The handler for this region was already installed */ |
368 | 368 | ||
369 | ACPI_MEM_FREE(region_context); | 369 | ACPI_FREE(region_context); |
370 | } else { | 370 | } else { |
371 | /* | 371 | /* |
372 | * Save the returned context for use in all accesses to | 372 | * Save the returned context for use in all accesses to |
diff --git a/drivers/acpi/events/evrgnini.c b/drivers/acpi/events/evrgnini.c index a0bffc2a0787..db98747fe54d 100644 --- a/drivers/acpi/events/evrgnini.c +++ b/drivers/acpi/events/evrgnini.c | |||
@@ -75,7 +75,7 @@ acpi_ev_system_memory_region_setup(acpi_handle handle, | |||
75 | 75 | ||
76 | if (function == ACPI_REGION_DEACTIVATE) { | 76 | if (function == ACPI_REGION_DEACTIVATE) { |
77 | if (*region_context) { | 77 | if (*region_context) { |
78 | ACPI_MEM_FREE(*region_context); | 78 | ACPI_FREE(*region_context); |
79 | *region_context = NULL; | 79 | *region_context = NULL; |
80 | } | 80 | } |
81 | return_ACPI_STATUS(AE_OK); | 81 | return_ACPI_STATUS(AE_OK); |
@@ -84,7 +84,7 @@ acpi_ev_system_memory_region_setup(acpi_handle handle, | |||
84 | /* Create a new context */ | 84 | /* Create a new context */ |
85 | 85 | ||
86 | local_region_context = | 86 | local_region_context = |
87 | ACPI_MEM_CALLOCATE(sizeof(struct acpi_mem_space_context)); | 87 | ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_mem_space_context)); |
88 | if (!(local_region_context)) { | 88 | if (!(local_region_context)) { |
89 | return_ACPI_STATUS(AE_NO_MEMORY); | 89 | return_ACPI_STATUS(AE_NO_MEMORY); |
90 | } | 90 | } |
@@ -178,7 +178,7 @@ acpi_ev_pci_config_region_setup(acpi_handle handle, | |||
178 | *region_context = NULL; | 178 | *region_context = NULL; |
179 | if (function == ACPI_REGION_DEACTIVATE) { | 179 | if (function == ACPI_REGION_DEACTIVATE) { |
180 | if (pci_id) { | 180 | if (pci_id) { |
181 | ACPI_MEM_FREE(pci_id); | 181 | ACPI_FREE(pci_id); |
182 | } | 182 | } |
183 | return_ACPI_STATUS(status); | 183 | return_ACPI_STATUS(status); |
184 | } | 184 | } |
@@ -264,7 +264,7 @@ acpi_ev_pci_config_region_setup(acpi_handle handle, | |||
264 | 264 | ||
265 | /* Region is still not initialized. Create a new context */ | 265 | /* Region is still not initialized. Create a new context */ |
266 | 266 | ||
267 | pci_id = ACPI_MEM_CALLOCATE(sizeof(struct acpi_pci_id)); | 267 | pci_id = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_pci_id)); |
268 | if (!pci_id) { | 268 | if (!pci_id) { |
269 | return_ACPI_STATUS(AE_NO_MEMORY); | 269 | return_ACPI_STATUS(AE_NO_MEMORY); |
270 | } | 270 | } |
diff --git a/drivers/acpi/events/evxface.c b/drivers/acpi/events/evxface.c index ba16fda3a158..7d1cebc871f6 100644 --- a/drivers/acpi/events/evxface.c +++ b/drivers/acpi/events/evxface.c | |||
@@ -41,8 +41,6 @@ | |||
41 | * POSSIBILITY OF SUCH DAMAGES. | 41 | * POSSIBILITY OF SUCH DAMAGES. |
42 | */ | 42 | */ |
43 | 43 | ||
44 | #include <linux/module.h> | ||
45 | |||
46 | #include <acpi/acpi.h> | 44 | #include <acpi/acpi.h> |
47 | #include <acpi/acnamesp.h> | 45 | #include <acpi/acnamesp.h> |
48 | #include <acpi/acevents.h> | 46 | #include <acpi/acevents.h> |
@@ -90,6 +88,8 @@ acpi_status acpi_install_exception_handler(acpi_exception_handler handler) | |||
90 | (void)acpi_ut_release_mutex(ACPI_MTX_EVENTS); | 88 | (void)acpi_ut_release_mutex(ACPI_MTX_EVENTS); |
91 | return_ACPI_STATUS(status); | 89 | return_ACPI_STATUS(status); |
92 | } | 90 | } |
91 | |||
92 | ACPI_EXPORT_SYMBOL(acpi_install_exception_handler) | ||
93 | #endif /* ACPI_FUTURE_USAGE */ | 93 | #endif /* ACPI_FUTURE_USAGE */ |
94 | 94 | ||
95 | /******************************************************************************* | 95 | /******************************************************************************* |
@@ -107,7 +107,6 @@ acpi_status acpi_install_exception_handler(acpi_exception_handler handler) | |||
107 | * event. | 107 | * event. |
108 | * | 108 | * |
109 | ******************************************************************************/ | 109 | ******************************************************************************/ |
110 | |||
111 | acpi_status | 110 | acpi_status |
112 | acpi_install_fixed_event_handler(u32 event, | 111 | acpi_install_fixed_event_handler(u32 event, |
113 | acpi_event_handler handler, void *context) | 112 | acpi_event_handler handler, void *context) |
@@ -161,7 +160,7 @@ acpi_install_fixed_event_handler(u32 event, | |||
161 | return_ACPI_STATUS(status); | 160 | return_ACPI_STATUS(status); |
162 | } | 161 | } |
163 | 162 | ||
164 | EXPORT_SYMBOL(acpi_install_fixed_event_handler); | 163 | ACPI_EXPORT_SYMBOL(acpi_install_fixed_event_handler) |
165 | 164 | ||
166 | /******************************************************************************* | 165 | /******************************************************************************* |
167 | * | 166 | * |
@@ -175,7 +174,6 @@ EXPORT_SYMBOL(acpi_install_fixed_event_handler); | |||
175 | * DESCRIPTION: Disables the event and unregisters the event handler. | 174 | * DESCRIPTION: Disables the event and unregisters the event handler. |
176 | * | 175 | * |
177 | ******************************************************************************/ | 176 | ******************************************************************************/ |
178 | |||
179 | acpi_status | 177 | acpi_status |
180 | acpi_remove_fixed_event_handler(u32 event, acpi_event_handler handler) | 178 | acpi_remove_fixed_event_handler(u32 event, acpi_event_handler handler) |
181 | { | 179 | { |
@@ -216,7 +214,7 @@ acpi_remove_fixed_event_handler(u32 event, acpi_event_handler handler) | |||
216 | return_ACPI_STATUS(status); | 214 | return_ACPI_STATUS(status); |
217 | } | 215 | } |
218 | 216 | ||
219 | EXPORT_SYMBOL(acpi_remove_fixed_event_handler); | 217 | ACPI_EXPORT_SYMBOL(acpi_remove_fixed_event_handler) |
220 | 218 | ||
221 | /******************************************************************************* | 219 | /******************************************************************************* |
222 | * | 220 | * |
@@ -235,7 +233,6 @@ EXPORT_SYMBOL(acpi_remove_fixed_event_handler); | |||
235 | * DESCRIPTION: Install a handler for notifies on an ACPI device | 233 | * DESCRIPTION: Install a handler for notifies on an ACPI device |
236 | * | 234 | * |
237 | ******************************************************************************/ | 235 | ******************************************************************************/ |
238 | |||
239 | acpi_status | 236 | acpi_status |
240 | acpi_install_notify_handler(acpi_handle device, | 237 | acpi_install_notify_handler(acpi_handle device, |
241 | u32 handler_type, | 238 | u32 handler_type, |
@@ -384,7 +381,7 @@ acpi_install_notify_handler(acpi_handle device, | |||
384 | return_ACPI_STATUS(status); | 381 | return_ACPI_STATUS(status); |
385 | } | 382 | } |
386 | 383 | ||
387 | EXPORT_SYMBOL(acpi_install_notify_handler); | 384 | ACPI_EXPORT_SYMBOL(acpi_install_notify_handler) |
388 | 385 | ||
389 | /******************************************************************************* | 386 | /******************************************************************************* |
390 | * | 387 | * |
@@ -402,7 +399,6 @@ EXPORT_SYMBOL(acpi_install_notify_handler); | |||
402 | * DESCRIPTION: Remove a handler for notifies on an ACPI device | 399 | * DESCRIPTION: Remove a handler for notifies on an ACPI device |
403 | * | 400 | * |
404 | ******************************************************************************/ | 401 | ******************************************************************************/ |
405 | |||
406 | acpi_status | 402 | acpi_status |
407 | acpi_remove_notify_handler(acpi_handle device, | 403 | acpi_remove_notify_handler(acpi_handle device, |
408 | u32 handler_type, acpi_notify_handler handler) | 404 | u32 handler_type, acpi_notify_handler handler) |
@@ -538,7 +534,7 @@ acpi_remove_notify_handler(acpi_handle device, | |||
538 | return_ACPI_STATUS(status); | 534 | return_ACPI_STATUS(status); |
539 | } | 535 | } |
540 | 536 | ||
541 | EXPORT_SYMBOL(acpi_remove_notify_handler); | 537 | ACPI_EXPORT_SYMBOL(acpi_remove_notify_handler) |
542 | 538 | ||
543 | /******************************************************************************* | 539 | /******************************************************************************* |
544 | * | 540 | * |
@@ -557,7 +553,6 @@ EXPORT_SYMBOL(acpi_remove_notify_handler); | |||
557 | * DESCRIPTION: Install a handler for a General Purpose Event. | 553 | * DESCRIPTION: Install a handler for a General Purpose Event. |
558 | * | 554 | * |
559 | ******************************************************************************/ | 555 | ******************************************************************************/ |
560 | |||
561 | acpi_status | 556 | acpi_status |
562 | acpi_install_gpe_handler(acpi_handle gpe_device, | 557 | acpi_install_gpe_handler(acpi_handle gpe_device, |
563 | u32 gpe_number, | 558 | u32 gpe_number, |
@@ -599,7 +594,7 @@ acpi_install_gpe_handler(acpi_handle gpe_device, | |||
599 | 594 | ||
600 | /* Allocate and init handler object */ | 595 | /* Allocate and init handler object */ |
601 | 596 | ||
602 | handler = ACPI_MEM_CALLOCATE(sizeof(struct acpi_handler_info)); | 597 | handler = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_handler_info)); |
603 | if (!handler) { | 598 | if (!handler) { |
604 | status = AE_NO_MEMORY; | 599 | status = AE_NO_MEMORY; |
605 | goto unlock_and_exit; | 600 | goto unlock_and_exit; |
@@ -633,7 +628,7 @@ acpi_install_gpe_handler(acpi_handle gpe_device, | |||
633 | return_ACPI_STATUS(status); | 628 | return_ACPI_STATUS(status); |
634 | } | 629 | } |
635 | 630 | ||
636 | EXPORT_SYMBOL(acpi_install_gpe_handler); | 631 | ACPI_EXPORT_SYMBOL(acpi_install_gpe_handler) |
637 | 632 | ||
638 | /******************************************************************************* | 633 | /******************************************************************************* |
639 | * | 634 | * |
@@ -649,7 +644,6 @@ EXPORT_SYMBOL(acpi_install_gpe_handler); | |||
649 | * DESCRIPTION: Remove a handler for a General Purpose acpi_event. | 644 | * DESCRIPTION: Remove a handler for a General Purpose acpi_event. |
650 | * | 645 | * |
651 | ******************************************************************************/ | 646 | ******************************************************************************/ |
652 | |||
653 | acpi_status | 647 | acpi_status |
654 | acpi_remove_gpe_handler(acpi_handle gpe_device, | 648 | acpi_remove_gpe_handler(acpi_handle gpe_device, |
655 | u32 gpe_number, acpi_event_handler address) | 649 | u32 gpe_number, acpi_event_handler address) |
@@ -727,14 +721,14 @@ acpi_remove_gpe_handler(acpi_handle gpe_device, | |||
727 | 721 | ||
728 | /* Now we can free the handler object */ | 722 | /* Now we can free the handler object */ |
729 | 723 | ||
730 | ACPI_MEM_FREE(handler); | 724 | ACPI_FREE(handler); |
731 | 725 | ||
732 | unlock_and_exit: | 726 | unlock_and_exit: |
733 | (void)acpi_ut_release_mutex(ACPI_MTX_EVENTS); | 727 | (void)acpi_ut_release_mutex(ACPI_MTX_EVENTS); |
734 | return_ACPI_STATUS(status); | 728 | return_ACPI_STATUS(status); |
735 | } | 729 | } |
736 | 730 | ||
737 | EXPORT_SYMBOL(acpi_remove_gpe_handler); | 731 | ACPI_EXPORT_SYMBOL(acpi_remove_gpe_handler) |
738 | 732 | ||
739 | /******************************************************************************* | 733 | /******************************************************************************* |
740 | * | 734 | * |
@@ -749,7 +743,6 @@ EXPORT_SYMBOL(acpi_remove_gpe_handler); | |||
749 | * DESCRIPTION: Acquire the ACPI Global Lock | 743 | * DESCRIPTION: Acquire the ACPI Global Lock |
750 | * | 744 | * |
751 | ******************************************************************************/ | 745 | ******************************************************************************/ |
752 | |||
753 | acpi_status acpi_acquire_global_lock(u16 timeout, u32 * handle) | 746 | acpi_status acpi_acquire_global_lock(u16 timeout, u32 * handle) |
754 | { | 747 | { |
755 | acpi_status status; | 748 | acpi_status status; |
@@ -774,7 +767,7 @@ acpi_status acpi_acquire_global_lock(u16 timeout, u32 * handle) | |||
774 | return (status); | 767 | return (status); |
775 | } | 768 | } |
776 | 769 | ||
777 | EXPORT_SYMBOL(acpi_acquire_global_lock); | 770 | ACPI_EXPORT_SYMBOL(acpi_acquire_global_lock) |
778 | 771 | ||
779 | /******************************************************************************* | 772 | /******************************************************************************* |
780 | * | 773 | * |
@@ -787,7 +780,6 @@ EXPORT_SYMBOL(acpi_acquire_global_lock); | |||
787 | * DESCRIPTION: Release the ACPI Global Lock. The handle must be valid. | 780 | * DESCRIPTION: Release the ACPI Global Lock. The handle must be valid. |
788 | * | 781 | * |
789 | ******************************************************************************/ | 782 | ******************************************************************************/ |
790 | |||
791 | acpi_status acpi_release_global_lock(u32 handle) | 783 | acpi_status acpi_release_global_lock(u32 handle) |
792 | { | 784 | { |
793 | acpi_status status; | 785 | acpi_status status; |
@@ -800,4 +792,4 @@ acpi_status acpi_release_global_lock(u32 handle) | |||
800 | return (status); | 792 | return (status); |
801 | } | 793 | } |
802 | 794 | ||
803 | EXPORT_SYMBOL(acpi_release_global_lock); | 795 | ACPI_EXPORT_SYMBOL(acpi_release_global_lock) |
diff --git a/drivers/acpi/events/evxfevnt.c b/drivers/acpi/events/evxfevnt.c index babebb501405..4a36559fa816 100644 --- a/drivers/acpi/events/evxfevnt.c +++ b/drivers/acpi/events/evxfevnt.c | |||
@@ -41,8 +41,6 @@ | |||
41 | * POSSIBILITY OF SUCH DAMAGES. | 41 | * POSSIBILITY OF SUCH DAMAGES. |
42 | */ | 42 | */ |
43 | 43 | ||
44 | #include <linux/module.h> | ||
45 | |||
46 | #include <acpi/acpi.h> | 44 | #include <acpi/acpi.h> |
47 | #include <acpi/acevents.h> | 45 | #include <acpi/acevents.h> |
48 | #include <acpi/acnamesp.h> | 46 | #include <acpi/acnamesp.h> |
@@ -94,6 +92,8 @@ acpi_status acpi_enable(void) | |||
94 | return_ACPI_STATUS(status); | 92 | return_ACPI_STATUS(status); |
95 | } | 93 | } |
96 | 94 | ||
95 | ACPI_EXPORT_SYMBOL(acpi_enable) | ||
96 | |||
97 | /******************************************************************************* | 97 | /******************************************************************************* |
98 | * | 98 | * |
99 | * FUNCTION: acpi_disable | 99 | * FUNCTION: acpi_disable |
@@ -105,7 +105,6 @@ acpi_status acpi_enable(void) | |||
105 | * DESCRIPTION: Transfers the system into LEGACY (non-ACPI) mode. | 105 | * DESCRIPTION: Transfers the system into LEGACY (non-ACPI) mode. |
106 | * | 106 | * |
107 | ******************************************************************************/ | 107 | ******************************************************************************/ |
108 | |||
109 | acpi_status acpi_disable(void) | 108 | acpi_status acpi_disable(void) |
110 | { | 109 | { |
111 | acpi_status status = AE_OK; | 110 | acpi_status status = AE_OK; |
@@ -137,6 +136,8 @@ acpi_status acpi_disable(void) | |||
137 | return_ACPI_STATUS(status); | 136 | return_ACPI_STATUS(status); |
138 | } | 137 | } |
139 | 138 | ||
139 | ACPI_EXPORT_SYMBOL(acpi_disable) | ||
140 | |||
140 | /******************************************************************************* | 141 | /******************************************************************************* |
141 | * | 142 | * |
142 | * FUNCTION: acpi_enable_event | 143 | * FUNCTION: acpi_enable_event |
@@ -149,7 +150,6 @@ acpi_status acpi_disable(void) | |||
149 | * DESCRIPTION: Enable an ACPI event (fixed) | 150 | * DESCRIPTION: Enable an ACPI event (fixed) |
150 | * | 151 | * |
151 | ******************************************************************************/ | 152 | ******************************************************************************/ |
152 | |||
153 | acpi_status acpi_enable_event(u32 event, u32 flags) | 153 | acpi_status acpi_enable_event(u32 event, u32 flags) |
154 | { | 154 | { |
155 | acpi_status status = AE_OK; | 155 | acpi_status status = AE_OK; |
@@ -193,7 +193,7 @@ acpi_status acpi_enable_event(u32 event, u32 flags) | |||
193 | return_ACPI_STATUS(status); | 193 | return_ACPI_STATUS(status); |
194 | } | 194 | } |
195 | 195 | ||
196 | EXPORT_SYMBOL(acpi_enable_event); | 196 | ACPI_EXPORT_SYMBOL(acpi_enable_event) |
197 | 197 | ||
198 | /******************************************************************************* | 198 | /******************************************************************************* |
199 | * | 199 | * |
@@ -208,7 +208,6 @@ EXPORT_SYMBOL(acpi_enable_event); | |||
208 | * DESCRIPTION: Set the type of an individual GPE | 208 | * DESCRIPTION: Set the type of an individual GPE |
209 | * | 209 | * |
210 | ******************************************************************************/ | 210 | ******************************************************************************/ |
211 | |||
212 | acpi_status acpi_set_gpe_type(acpi_handle gpe_device, u32 gpe_number, u8 type) | 211 | acpi_status acpi_set_gpe_type(acpi_handle gpe_device, u32 gpe_number, u8 type) |
213 | { | 212 | { |
214 | acpi_status status = AE_OK; | 213 | acpi_status status = AE_OK; |
@@ -236,7 +235,7 @@ acpi_status acpi_set_gpe_type(acpi_handle gpe_device, u32 gpe_number, u8 type) | |||
236 | return_ACPI_STATUS(status); | 235 | return_ACPI_STATUS(status); |
237 | } | 236 | } |
238 | 237 | ||
239 | EXPORT_SYMBOL(acpi_set_gpe_type); | 238 | ACPI_EXPORT_SYMBOL(acpi_set_gpe_type) |
240 | 239 | ||
241 | /******************************************************************************* | 240 | /******************************************************************************* |
242 | * | 241 | * |
@@ -252,7 +251,6 @@ EXPORT_SYMBOL(acpi_set_gpe_type); | |||
252 | * DESCRIPTION: Enable an ACPI event (general purpose) | 251 | * DESCRIPTION: Enable an ACPI event (general purpose) |
253 | * | 252 | * |
254 | ******************************************************************************/ | 253 | ******************************************************************************/ |
255 | |||
256 | acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags) | 254 | acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags) |
257 | { | 255 | { |
258 | acpi_status status = AE_OK; | 256 | acpi_status status = AE_OK; |
@@ -288,7 +286,7 @@ acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags) | |||
288 | return_ACPI_STATUS(status); | 286 | return_ACPI_STATUS(status); |
289 | } | 287 | } |
290 | 288 | ||
291 | EXPORT_SYMBOL(acpi_enable_gpe); | 289 | ACPI_EXPORT_SYMBOL(acpi_enable_gpe) |
292 | 290 | ||
293 | /******************************************************************************* | 291 | /******************************************************************************* |
294 | * | 292 | * |
@@ -304,7 +302,6 @@ EXPORT_SYMBOL(acpi_enable_gpe); | |||
304 | * DESCRIPTION: Disable an ACPI event (general purpose) | 302 | * DESCRIPTION: Disable an ACPI event (general purpose) |
305 | * | 303 | * |
306 | ******************************************************************************/ | 304 | ******************************************************************************/ |
307 | |||
308 | acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags) | 305 | acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags) |
309 | { | 306 | { |
310 | acpi_status status = AE_OK; | 307 | acpi_status status = AE_OK; |
@@ -338,6 +335,8 @@ acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags) | |||
338 | return_ACPI_STATUS(status); | 335 | return_ACPI_STATUS(status); |
339 | } | 336 | } |
340 | 337 | ||
338 | ACPI_EXPORT_SYMBOL(acpi_disable_gpe) | ||
339 | |||
341 | /******************************************************************************* | 340 | /******************************************************************************* |
342 | * | 341 | * |
343 | * FUNCTION: acpi_disable_event | 342 | * FUNCTION: acpi_disable_event |
@@ -350,7 +349,6 @@ acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags) | |||
350 | * DESCRIPTION: Disable an ACPI event (fixed) | 349 | * DESCRIPTION: Disable an ACPI event (fixed) |
351 | * | 350 | * |
352 | ******************************************************************************/ | 351 | ******************************************************************************/ |
353 | |||
354 | acpi_status acpi_disable_event(u32 event, u32 flags) | 352 | acpi_status acpi_disable_event(u32 event, u32 flags) |
355 | { | 353 | { |
356 | acpi_status status = AE_OK; | 354 | acpi_status status = AE_OK; |
@@ -392,7 +390,7 @@ acpi_status acpi_disable_event(u32 event, u32 flags) | |||
392 | return_ACPI_STATUS(status); | 390 | return_ACPI_STATUS(status); |
393 | } | 391 | } |
394 | 392 | ||
395 | EXPORT_SYMBOL(acpi_disable_event); | 393 | ACPI_EXPORT_SYMBOL(acpi_disable_event) |
396 | 394 | ||
397 | /******************************************************************************* | 395 | /******************************************************************************* |
398 | * | 396 | * |
@@ -405,7 +403,6 @@ EXPORT_SYMBOL(acpi_disable_event); | |||
405 | * DESCRIPTION: Clear an ACPI event (fixed) | 403 | * DESCRIPTION: Clear an ACPI event (fixed) |
406 | * | 404 | * |
407 | ******************************************************************************/ | 405 | ******************************************************************************/ |
408 | |||
409 | acpi_status acpi_clear_event(u32 event) | 406 | acpi_status acpi_clear_event(u32 event) |
410 | { | 407 | { |
411 | acpi_status status = AE_OK; | 408 | acpi_status status = AE_OK; |
@@ -429,7 +426,7 @@ acpi_status acpi_clear_event(u32 event) | |||
429 | return_ACPI_STATUS(status); | 426 | return_ACPI_STATUS(status); |
430 | } | 427 | } |
431 | 428 | ||
432 | EXPORT_SYMBOL(acpi_clear_event); | 429 | ACPI_EXPORT_SYMBOL(acpi_clear_event) |
433 | 430 | ||
434 | /******************************************************************************* | 431 | /******************************************************************************* |
435 | * | 432 | * |
@@ -444,7 +441,6 @@ EXPORT_SYMBOL(acpi_clear_event); | |||
444 | * DESCRIPTION: Clear an ACPI event (general purpose) | 441 | * DESCRIPTION: Clear an ACPI event (general purpose) |
445 | * | 442 | * |
446 | ******************************************************************************/ | 443 | ******************************************************************************/ |
447 | |||
448 | acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags) | 444 | acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags) |
449 | { | 445 | { |
450 | acpi_status status = AE_OK; | 446 | acpi_status status = AE_OK; |
@@ -478,6 +474,8 @@ acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags) | |||
478 | return_ACPI_STATUS(status); | 474 | return_ACPI_STATUS(status); |
479 | } | 475 | } |
480 | 476 | ||
477 | ACPI_EXPORT_SYMBOL(acpi_clear_gpe) | ||
478 | |||
481 | #ifdef ACPI_FUTURE_USAGE | 479 | #ifdef ACPI_FUTURE_USAGE |
482 | /******************************************************************************* | 480 | /******************************************************************************* |
483 | * | 481 | * |
@@ -492,7 +490,6 @@ acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags) | |||
492 | * DESCRIPTION: Obtains and returns the current status of the event | 490 | * DESCRIPTION: Obtains and returns the current status of the event |
493 | * | 491 | * |
494 | ******************************************************************************/ | 492 | ******************************************************************************/ |
495 | |||
496 | acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status) | 493 | acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status) |
497 | { | 494 | { |
498 | acpi_status status = AE_OK; | 495 | acpi_status status = AE_OK; |
@@ -518,6 +515,8 @@ acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status) | |||
518 | return_ACPI_STATUS(status); | 515 | return_ACPI_STATUS(status); |
519 | } | 516 | } |
520 | 517 | ||
518 | ACPI_EXPORT_SYMBOL(acpi_get_event_status) | ||
519 | |||
521 | /******************************************************************************* | 520 | /******************************************************************************* |
522 | * | 521 | * |
523 | * FUNCTION: acpi_get_gpe_status | 522 | * FUNCTION: acpi_get_gpe_status |
@@ -533,7 +532,6 @@ acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status) | |||
533 | * DESCRIPTION: Get status of an event (general purpose) | 532 | * DESCRIPTION: Get status of an event (general purpose) |
534 | * | 533 | * |
535 | ******************************************************************************/ | 534 | ******************************************************************************/ |
536 | |||
537 | acpi_status | 535 | acpi_status |
538 | acpi_get_gpe_status(acpi_handle gpe_device, | 536 | acpi_get_gpe_status(acpi_handle gpe_device, |
539 | u32 gpe_number, u32 flags, acpi_event_status * event_status) | 537 | u32 gpe_number, u32 flags, acpi_event_status * event_status) |
@@ -570,6 +568,8 @@ acpi_get_gpe_status(acpi_handle gpe_device, | |||
570 | } | 568 | } |
571 | return_ACPI_STATUS(status); | 569 | return_ACPI_STATUS(status); |
572 | } | 570 | } |
571 | |||
572 | ACPI_EXPORT_SYMBOL(acpi_get_gpe_status) | ||
573 | #endif /* ACPI_FUTURE_USAGE */ | 573 | #endif /* ACPI_FUTURE_USAGE */ |
574 | 574 | ||
575 | /******************************************************************************* | 575 | /******************************************************************************* |
@@ -586,7 +586,6 @@ acpi_get_gpe_status(acpi_handle gpe_device, | |||
586 | * DESCRIPTION: Create and Install a block of GPE registers | 586 | * DESCRIPTION: Create and Install a block of GPE registers |
587 | * | 587 | * |
588 | ******************************************************************************/ | 588 | ******************************************************************************/ |
589 | |||
590 | acpi_status | 589 | acpi_status |
591 | acpi_install_gpe_block(acpi_handle gpe_device, | 590 | acpi_install_gpe_block(acpi_handle gpe_device, |
592 | struct acpi_generic_address *gpe_block_address, | 591 | struct acpi_generic_address *gpe_block_address, |
@@ -666,7 +665,7 @@ acpi_install_gpe_block(acpi_handle gpe_device, | |||
666 | return_ACPI_STATUS(status); | 665 | return_ACPI_STATUS(status); |
667 | } | 666 | } |
668 | 667 | ||
669 | EXPORT_SYMBOL(acpi_install_gpe_block); | 668 | ACPI_EXPORT_SYMBOL(acpi_install_gpe_block) |
670 | 669 | ||
671 | /******************************************************************************* | 670 | /******************************************************************************* |
672 | * | 671 | * |
@@ -679,7 +678,6 @@ EXPORT_SYMBOL(acpi_install_gpe_block); | |||
679 | * DESCRIPTION: Remove a previously installed block of GPE registers | 678 | * DESCRIPTION: Remove a previously installed block of GPE registers |
680 | * | 679 | * |
681 | ******************************************************************************/ | 680 | ******************************************************************************/ |
682 | |||
683 | acpi_status acpi_remove_gpe_block(acpi_handle gpe_device) | 681 | acpi_status acpi_remove_gpe_block(acpi_handle gpe_device) |
684 | { | 682 | { |
685 | union acpi_operand_object *obj_desc; | 683 | union acpi_operand_object *obj_desc; |
@@ -722,4 +720,4 @@ acpi_status acpi_remove_gpe_block(acpi_handle gpe_device) | |||
722 | return_ACPI_STATUS(status); | 720 | return_ACPI_STATUS(status); |
723 | } | 721 | } |
724 | 722 | ||
725 | EXPORT_SYMBOL(acpi_remove_gpe_block); | 723 | ACPI_EXPORT_SYMBOL(acpi_remove_gpe_block) |
diff --git a/drivers/acpi/events/evxfregn.c b/drivers/acpi/events/evxfregn.c index 368c8aa0094b..63a070bb9d17 100644 --- a/drivers/acpi/events/evxfregn.c +++ b/drivers/acpi/events/evxfregn.c | |||
@@ -42,8 +42,6 @@ | |||
42 | * POSSIBILITY OF SUCH DAMAGES. | 42 | * POSSIBILITY OF SUCH DAMAGES. |
43 | */ | 43 | */ |
44 | 44 | ||
45 | #include <linux/module.h> | ||
46 | |||
47 | #include <acpi/acpi.h> | 45 | #include <acpi/acpi.h> |
48 | #include <acpi/acnamesp.h> | 46 | #include <acpi/acnamesp.h> |
49 | #include <acpi/acevents.h> | 47 | #include <acpi/acevents.h> |
@@ -114,7 +112,7 @@ acpi_install_address_space_handler(acpi_handle device, | |||
114 | return_ACPI_STATUS(status); | 112 | return_ACPI_STATUS(status); |
115 | } | 113 | } |
116 | 114 | ||
117 | EXPORT_SYMBOL(acpi_install_address_space_handler); | 115 | ACPI_EXPORT_SYMBOL(acpi_install_address_space_handler) |
118 | 116 | ||
119 | /******************************************************************************* | 117 | /******************************************************************************* |
120 | * | 118 | * |
@@ -129,7 +127,6 @@ EXPORT_SYMBOL(acpi_install_address_space_handler); | |||
129 | * DESCRIPTION: Remove a previously installed handler. | 127 | * DESCRIPTION: Remove a previously installed handler. |
130 | * | 128 | * |
131 | ******************************************************************************/ | 129 | ******************************************************************************/ |
132 | |||
133 | acpi_status | 130 | acpi_status |
134 | acpi_remove_address_space_handler(acpi_handle device, | 131 | acpi_remove_address_space_handler(acpi_handle device, |
135 | acpi_adr_space_type space_id, | 132 | acpi_adr_space_type space_id, |
@@ -242,4 +239,4 @@ acpi_remove_address_space_handler(acpi_handle device, | |||
242 | return_ACPI_STATUS(status); | 239 | return_ACPI_STATUS(status); |
243 | } | 240 | } |
244 | 241 | ||
245 | EXPORT_SYMBOL(acpi_remove_address_space_handler); | 242 | ACPI_EXPORT_SYMBOL(acpi_remove_address_space_handler) |
diff --git a/drivers/acpi/executer/exconfig.c b/drivers/acpi/executer/exconfig.c index 864530f754c3..e0deffb56790 100644 --- a/drivers/acpi/executer/exconfig.c +++ b/drivers/acpi/executer/exconfig.c | |||
@@ -349,7 +349,7 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc, | |||
349 | 349 | ||
350 | /* Allocate a buffer for the entire table */ | 350 | /* Allocate a buffer for the entire table */ |
351 | 351 | ||
352 | table_ptr = ACPI_MEM_ALLOCATE(table_header.length); | 352 | table_ptr = ACPI_ALLOCATE(table_header.length); |
353 | if (!table_ptr) { | 353 | if (!table_ptr) { |
354 | return_ACPI_STATUS(AE_NO_MEMORY); | 354 | return_ACPI_STATUS(AE_NO_MEMORY); |
355 | } | 355 | } |
@@ -447,7 +447,7 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc, | |||
447 | 447 | ||
448 | cleanup: | 448 | cleanup: |
449 | if (ACPI_FAILURE(status)) { | 449 | if (ACPI_FAILURE(status)) { |
450 | ACPI_MEM_FREE(table_ptr); | 450 | ACPI_FREE(table_ptr); |
451 | } | 451 | } |
452 | return_ACPI_STATUS(status); | 452 | return_ACPI_STATUS(status); |
453 | } | 453 | } |
diff --git a/drivers/acpi/executer/exdump.c b/drivers/acpi/executer/exdump.c index 0a53d31e09de..502293c35afa 100644 --- a/drivers/acpi/executer/exdump.c +++ b/drivers/acpi/executer/exdump.c | |||
@@ -903,7 +903,7 @@ static void acpi_ex_dump_reference_obj(union acpi_operand_object *obj_desc) | |||
903 | acpi_os_printf("Could not convert name to pathname\n"); | 903 | acpi_os_printf("Could not convert name to pathname\n"); |
904 | } else { | 904 | } else { |
905 | acpi_os_printf("%s\n", (char *)ret_buf.pointer); | 905 | acpi_os_printf("%s\n", (char *)ret_buf.pointer); |
906 | ACPI_MEM_FREE(ret_buf.pointer); | 906 | ACPI_FREE(ret_buf.pointer); |
907 | } | 907 | } |
908 | } else if (obj_desc->reference.object) { | 908 | } else if (obj_desc->reference.object) { |
909 | acpi_os_printf("\nReferenced Object: %p\n", | 909 | acpi_os_printf("\nReferenced Object: %p\n", |
diff --git a/drivers/acpi/executer/exfield.c b/drivers/acpi/executer/exfield.c index 215783a33c2c..36c265a00c26 100644 --- a/drivers/acpi/executer/exfield.c +++ b/drivers/acpi/executer/exfield.c | |||
@@ -333,7 +333,7 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc, | |||
333 | 333 | ||
334 | /* We need to create a new buffer */ | 334 | /* We need to create a new buffer */ |
335 | 335 | ||
336 | new_buffer = ACPI_MEM_CALLOCATE(required_length); | 336 | new_buffer = ACPI_ALLOCATE_ZEROED(required_length); |
337 | if (!new_buffer) { | 337 | if (!new_buffer) { |
338 | return_ACPI_STATUS(AE_NO_MEMORY); | 338 | return_ACPI_STATUS(AE_NO_MEMORY); |
339 | } | 339 | } |
@@ -377,7 +377,7 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc, | |||
377 | /* Free temporary buffer if we used one */ | 377 | /* Free temporary buffer if we used one */ |
378 | 378 | ||
379 | if (new_buffer) { | 379 | if (new_buffer) { |
380 | ACPI_MEM_FREE(new_buffer); | 380 | ACPI_FREE(new_buffer); |
381 | } | 381 | } |
382 | 382 | ||
383 | return_ACPI_STATUS(status); | 383 | return_ACPI_STATUS(status); |
diff --git a/drivers/acpi/executer/exnames.c b/drivers/acpi/executer/exnames.c index f9bc81c1b78d..80bbc20756a1 100644 --- a/drivers/acpi/executer/exnames.c +++ b/drivers/acpi/executer/exnames.c | |||
@@ -98,7 +98,7 @@ static char *acpi_ex_allocate_name_string(u32 prefix_count, u32 num_name_segs) | |||
98 | * Allocate a buffer for the name. | 98 | * Allocate a buffer for the name. |
99 | * This buffer must be deleted by the caller! | 99 | * This buffer must be deleted by the caller! |
100 | */ | 100 | */ |
101 | name_string = ACPI_MEM_ALLOCATE(size_needed); | 101 | name_string = ACPI_ALLOCATE(size_needed); |
102 | if (!name_string) { | 102 | if (!name_string) { |
103 | ACPI_ERROR((AE_INFO, | 103 | ACPI_ERROR((AE_INFO, |
104 | "Could not allocate size %d", size_needed)); | 104 | "Could not allocate size %d", size_needed)); |
@@ -424,7 +424,7 @@ acpi_ex_get_name_string(acpi_object_type data_type, | |||
424 | 424 | ||
425 | if (ACPI_FAILURE(status)) { | 425 | if (ACPI_FAILURE(status)) { |
426 | if (name_string) { | 426 | if (name_string) { |
427 | ACPI_MEM_FREE(name_string); | 427 | ACPI_FREE(name_string); |
428 | } | 428 | } |
429 | return_ACPI_STATUS(status); | 429 | return_ACPI_STATUS(status); |
430 | } | 430 | } |
diff --git a/drivers/acpi/executer/exoparg1.c b/drivers/acpi/executer/exoparg1.c index 4f3627ee2b2b..d00f766246f3 100644 --- a/drivers/acpi/executer/exoparg1.c +++ b/drivers/acpi/executer/exoparg1.c | |||
@@ -554,16 +554,18 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state) | |||
554 | 554 | ||
555 | cleanup: | 555 | cleanup: |
556 | 556 | ||
557 | if (!walk_state->result_obj) { | ||
558 | walk_state->result_obj = return_desc; | ||
559 | } | ||
560 | |||
561 | /* Delete return object on error */ | 557 | /* Delete return object on error */ |
562 | 558 | ||
563 | if (ACPI_FAILURE(status)) { | 559 | if (ACPI_FAILURE(status)) { |
564 | acpi_ut_remove_reference(return_desc); | 560 | acpi_ut_remove_reference(return_desc); |
565 | } | 561 | } |
566 | 562 | ||
563 | /* Save return object on success */ | ||
564 | |||
565 | else if (!walk_state->result_obj) { | ||
566 | walk_state->result_obj = return_desc; | ||
567 | } | ||
568 | |||
567 | return_ACPI_STATUS(status); | 569 | return_ACPI_STATUS(status); |
568 | } | 570 | } |
569 | 571 | ||
@@ -1028,6 +1030,11 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) | |||
1028 | acpi_ut_remove_reference(return_desc); | 1030 | acpi_ut_remove_reference(return_desc); |
1029 | } | 1031 | } |
1030 | 1032 | ||
1031 | walk_state->result_obj = return_desc; | 1033 | /* Save return object on success */ |
1034 | |||
1035 | else { | ||
1036 | walk_state->result_obj = return_desc; | ||
1037 | } | ||
1038 | |||
1032 | return_ACPI_STATUS(status); | 1039 | return_ACPI_STATUS(status); |
1033 | } | 1040 | } |
diff --git a/drivers/acpi/executer/exoparg2.c b/drivers/acpi/executer/exoparg2.c index 5e1abb12c748..690e43db0abe 100644 --- a/drivers/acpi/executer/exoparg2.c +++ b/drivers/acpi/executer/exoparg2.c | |||
@@ -391,7 +391,6 @@ acpi_status acpi_ex_opcode_2A_1T_1R(struct acpi_walk_state *walk_state) | |||
391 | index = operand[1]->integer.value; | 391 | index = operand[1]->integer.value; |
392 | return_desc->reference.offset = (u32) index; | 392 | return_desc->reference.offset = (u32) index; |
393 | return_desc->reference.opcode = AML_INDEX_OP; | 393 | return_desc->reference.opcode = AML_INDEX_OP; |
394 | return_desc->reference.object = operand[0]; | ||
395 | 394 | ||
396 | /* | 395 | /* |
397 | * At this point, the Source operand is a String, Buffer, or Package. | 396 | * At this point, the Source operand is a String, Buffer, or Package. |
@@ -445,9 +444,10 @@ acpi_status acpi_ex_opcode_2A_1T_1R(struct acpi_walk_state *walk_state) | |||
445 | } | 444 | } |
446 | 445 | ||
447 | /* | 446 | /* |
448 | * Add a reference to the target package/buffer/string for the life | 447 | * Save the target object and add a reference to it for the life |
449 | * of the index | 448 | * of the index |
450 | */ | 449 | */ |
450 | return_desc->reference.object = operand[0]; | ||
451 | acpi_ut_add_reference(operand[0]); | 451 | acpi_ut_add_reference(operand[0]); |
452 | 452 | ||
453 | /* Store the reference to the Target */ | 453 | /* Store the reference to the Target */ |
diff --git a/drivers/acpi/executer/exoparg3.c b/drivers/acpi/executer/exoparg3.c index 8da794ec35b0..4897e6c3431f 100644 --- a/drivers/acpi/executer/exoparg3.c +++ b/drivers/acpi/executer/exoparg3.c | |||
@@ -100,8 +100,7 @@ acpi_status acpi_ex_opcode_3A_0T_0R(struct acpi_walk_state *walk_state) | |||
100 | (u32) operand[1]->integer.value, | 100 | (u32) operand[1]->integer.value, |
101 | (u32) operand[2]->integer.value)); | 101 | (u32) operand[2]->integer.value)); |
102 | 102 | ||
103 | fatal = | 103 | fatal = ACPI_ALLOCATE(sizeof(struct acpi_signal_fatal_info)); |
104 | ACPI_MEM_ALLOCATE(sizeof(struct acpi_signal_fatal_info)); | ||
105 | if (fatal) { | 104 | if (fatal) { |
106 | fatal->type = (u32) operand[0]->integer.value; | 105 | fatal->type = (u32) operand[0]->integer.value; |
107 | fatal->code = (u32) operand[1]->integer.value; | 106 | fatal->code = (u32) operand[1]->integer.value; |
@@ -114,7 +113,7 @@ acpi_status acpi_ex_opcode_3A_0T_0R(struct acpi_walk_state *walk_state) | |||
114 | 113 | ||
115 | /* Might return while OS is shutting down, just continue */ | 114 | /* Might return while OS is shutting down, just continue */ |
116 | 115 | ||
117 | ACPI_MEM_FREE(fatal); | 116 | ACPI_FREE(fatal); |
118 | break; | 117 | break; |
119 | 118 | ||
120 | default: | 119 | default: |
@@ -196,7 +195,7 @@ acpi_status acpi_ex_opcode_3A_1T_1R(struct acpi_walk_state *walk_state) | |||
196 | 195 | ||
197 | /* Always allocate a new buffer for the String */ | 196 | /* Always allocate a new buffer for the String */ |
198 | 197 | ||
199 | buffer = ACPI_MEM_CALLOCATE((acpi_size) length + 1); | 198 | buffer = ACPI_ALLOCATE_ZEROED((acpi_size) length + 1); |
200 | if (!buffer) { | 199 | if (!buffer) { |
201 | status = AE_NO_MEMORY; | 200 | status = AE_NO_MEMORY; |
202 | goto cleanup; | 201 | goto cleanup; |
@@ -211,7 +210,7 @@ acpi_status acpi_ex_opcode_3A_1T_1R(struct acpi_walk_state *walk_state) | |||
211 | 210 | ||
212 | /* Allocate a new buffer for the Buffer */ | 211 | /* Allocate a new buffer for the Buffer */ |
213 | 212 | ||
214 | buffer = ACPI_MEM_CALLOCATE(length); | 213 | buffer = ACPI_ALLOCATE_ZEROED(length); |
215 | if (!buffer) { | 214 | if (!buffer) { |
216 | status = AE_NO_MEMORY; | 215 | status = AE_NO_MEMORY; |
217 | goto cleanup; | 216 | goto cleanup; |
diff --git a/drivers/acpi/executer/exregion.c b/drivers/acpi/executer/exregion.c index 9db68d19253e..fdeda7beae43 100644 --- a/drivers/acpi/executer/exregion.c +++ b/drivers/acpi/executer/exregion.c | |||
@@ -182,8 +182,8 @@ acpi_ex_system_memory_space_handler(u32 function, | |||
182 | (acpi_integer) mem_info->mapped_physical_address); | 182 | (acpi_integer) mem_info->mapped_physical_address); |
183 | 183 | ||
184 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | 184 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
185 | "system_memory %d (%d width) Address=%8.8X%8.8X\n", | 185 | "System-Memory (width %d) R/W %d Address=%8.8X%8.8X\n", |
186 | function, bit_width, ACPI_FORMAT_UINT64(address))); | 186 | bit_width, function, ACPI_FORMAT_UINT64(address))); |
187 | 187 | ||
188 | /* | 188 | /* |
189 | * Perform the memory read or write | 189 | * Perform the memory read or write |
@@ -287,8 +287,8 @@ acpi_ex_system_io_space_handler(u32 function, | |||
287 | ACPI_FUNCTION_TRACE("ex_system_io_space_handler"); | 287 | ACPI_FUNCTION_TRACE("ex_system_io_space_handler"); |
288 | 288 | ||
289 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | 289 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
290 | "system_iO %d (%d width) Address=%8.8X%8.8X\n", | 290 | "System-IO (width %d) R/W %d Address=%8.8X%8.8X\n", |
291 | function, bit_width, ACPI_FORMAT_UINT64(address))); | 291 | bit_width, function, ACPI_FORMAT_UINT64(address))); |
292 | 292 | ||
293 | /* Decode the function parameter */ | 293 | /* Decode the function parameter */ |
294 | 294 | ||
@@ -361,7 +361,7 @@ acpi_ex_pci_config_space_handler(u32 function, | |||
361 | pci_register = (u16) (u32) address; | 361 | pci_register = (u16) (u32) address; |
362 | 362 | ||
363 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | 363 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
364 | "pci_config %d (%d) Seg(%04x) Bus(%04x) Dev(%04x) Func(%04x) Reg(%04x)\n", | 364 | "Pci-Config %d (%d) Seg(%04x) Bus(%04x) Dev(%04x) Func(%04x) Reg(%04x)\n", |
365 | function, bit_width, pci_id->segment, pci_id->bus, | 365 | function, bit_width, pci_id->segment, pci_id->bus, |
366 | pci_id->device, pci_id->function, pci_register)); | 366 | pci_id->device, pci_id->function, pci_register)); |
367 | 367 | ||
diff --git a/drivers/acpi/executer/exstorob.c b/drivers/acpi/executer/exstorob.c index 41732d382bce..db42461101e0 100644 --- a/drivers/acpi/executer/exstorob.c +++ b/drivers/acpi/executer/exstorob.c | |||
@@ -80,7 +80,7 @@ acpi_ex_store_buffer_to_buffer(union acpi_operand_object *source_desc, | |||
80 | */ | 80 | */ |
81 | if ((target_desc->buffer.length == 0) || | 81 | if ((target_desc->buffer.length == 0) || |
82 | (target_desc->common.flags & AOPOBJ_STATIC_POINTER)) { | 82 | (target_desc->common.flags & AOPOBJ_STATIC_POINTER)) { |
83 | target_desc->buffer.pointer = ACPI_MEM_ALLOCATE(length); | 83 | target_desc->buffer.pointer = ACPI_ALLOCATE(length); |
84 | if (!target_desc->buffer.pointer) { | 84 | if (!target_desc->buffer.pointer) { |
85 | return_ACPI_STATUS(AE_NO_MEMORY); | 85 | return_ACPI_STATUS(AE_NO_MEMORY); |
86 | } | 86 | } |
@@ -188,11 +188,11 @@ acpi_ex_store_string_to_string(union acpi_operand_object *source_desc, | |||
188 | 188 | ||
189 | /* Only free if not a pointer into the DSDT */ | 189 | /* Only free if not a pointer into the DSDT */ |
190 | 190 | ||
191 | ACPI_MEM_FREE(target_desc->string.pointer); | 191 | ACPI_FREE(target_desc->string.pointer); |
192 | } | 192 | } |
193 | 193 | ||
194 | target_desc->string.pointer = ACPI_MEM_CALLOCATE((acpi_size) | 194 | target_desc->string.pointer = ACPI_ALLOCATE_ZEROED((acpi_size) |
195 | length + 1); | 195 | length + 1); |
196 | if (!target_desc->string.pointer) { | 196 | if (!target_desc->string.pointer) { |
197 | return_ACPI_STATUS(AE_NO_MEMORY); | 197 | return_ACPI_STATUS(AE_NO_MEMORY); |
198 | } | 198 | } |
diff --git a/drivers/acpi/hardware/hwregs.c b/drivers/acpi/hardware/hwregs.c index 95c4ccb3a378..3d1f41c6bfe9 100644 --- a/drivers/acpi/hardware/hwregs.c +++ b/drivers/acpi/hardware/hwregs.c | |||
@@ -43,8 +43,6 @@ | |||
43 | * POSSIBILITY OF SUCH DAMAGES. | 43 | * POSSIBILITY OF SUCH DAMAGES. |
44 | */ | 44 | */ |
45 | 45 | ||
46 | #include <linux/module.h> | ||
47 | |||
48 | #include <acpi/acpi.h> | 46 | #include <acpi/acpi.h> |
49 | #include <acpi/acnamesp.h> | 47 | #include <acpi/acnamesp.h> |
50 | #include <acpi/acevents.h> | 48 | #include <acpi/acevents.h> |
@@ -220,7 +218,7 @@ acpi_get_sleep_type_data(u8 sleep_state, u8 * sleep_type_a, u8 * sleep_type_b) | |||
220 | return_ACPI_STATUS(status); | 218 | return_ACPI_STATUS(status); |
221 | } | 219 | } |
222 | 220 | ||
223 | EXPORT_SYMBOL(acpi_get_sleep_type_data); | 221 | ACPI_EXPORT_SYMBOL(acpi_get_sleep_type_data) |
224 | 222 | ||
225 | /******************************************************************************* | 223 | /******************************************************************************* |
226 | * | 224 | * |
@@ -233,7 +231,6 @@ EXPORT_SYMBOL(acpi_get_sleep_type_data); | |||
233 | * DESCRIPTION: Map register_id into a register bitmask. | 231 | * DESCRIPTION: Map register_id into a register bitmask. |
234 | * | 232 | * |
235 | ******************************************************************************/ | 233 | ******************************************************************************/ |
236 | |||
237 | struct acpi_bit_register_info *acpi_hw_get_bit_register_info(u32 register_id) | 234 | struct acpi_bit_register_info *acpi_hw_get_bit_register_info(u32 register_id) |
238 | { | 235 | { |
239 | ACPI_FUNCTION_ENTRY(); | 236 | ACPI_FUNCTION_ENTRY(); |
@@ -312,7 +309,7 @@ acpi_status acpi_get_register(u32 register_id, u32 * return_value, u32 flags) | |||
312 | return_ACPI_STATUS(status); | 309 | return_ACPI_STATUS(status); |
313 | } | 310 | } |
314 | 311 | ||
315 | EXPORT_SYMBOL(acpi_get_register); | 312 | ACPI_EXPORT_SYMBOL(acpi_get_register) |
316 | 313 | ||
317 | /******************************************************************************* | 314 | /******************************************************************************* |
318 | * | 315 | * |
@@ -328,7 +325,6 @@ EXPORT_SYMBOL(acpi_get_register); | |||
328 | * DESCRIPTION: ACPI Bit Register write function. | 325 | * DESCRIPTION: ACPI Bit Register write function. |
329 | * | 326 | * |
330 | ******************************************************************************/ | 327 | ******************************************************************************/ |
331 | |||
332 | acpi_status acpi_set_register(u32 register_id, u32 value, u32 flags) | 328 | acpi_status acpi_set_register(u32 register_id, u32 value, u32 flags) |
333 | { | 329 | { |
334 | u32 register_value = 0; | 330 | u32 register_value = 0; |
@@ -475,7 +471,7 @@ acpi_status acpi_set_register(u32 register_id, u32 value, u32 flags) | |||
475 | return_ACPI_STATUS(status); | 471 | return_ACPI_STATUS(status); |
476 | } | 472 | } |
477 | 473 | ||
478 | EXPORT_SYMBOL(acpi_set_register); | 474 | ACPI_EXPORT_SYMBOL(acpi_set_register) |
479 | 475 | ||
480 | /****************************************************************************** | 476 | /****************************************************************************** |
481 | * | 477 | * |
@@ -491,7 +487,6 @@ EXPORT_SYMBOL(acpi_set_register); | |||
491 | * given offset. | 487 | * given offset. |
492 | * | 488 | * |
493 | ******************************************************************************/ | 489 | ******************************************************************************/ |
494 | |||
495 | acpi_status | 490 | acpi_status |
496 | acpi_hw_register_read(u8 use_lock, u32 register_id, u32 * return_value) | 491 | acpi_hw_register_read(u8 use_lock, u32 register_id, u32 * return_value) |
497 | { | 492 | { |
diff --git a/drivers/acpi/hardware/hwsleep.c b/drivers/acpi/hardware/hwsleep.c index 284a59ebcc2c..685debafbb72 100644 --- a/drivers/acpi/hardware/hwsleep.c +++ b/drivers/acpi/hardware/hwsleep.c | |||
@@ -42,7 +42,6 @@ | |||
42 | * POSSIBILITY OF SUCH DAMAGES. | 42 | * POSSIBILITY OF SUCH DAMAGES. |
43 | */ | 43 | */ |
44 | 44 | ||
45 | #include <linux/module.h> | ||
46 | #include <acpi/acpi.h> | 45 | #include <acpi/acpi.h> |
47 | 46 | ||
48 | #define _COMPONENT ACPI_HARDWARE | 47 | #define _COMPONENT ACPI_HARDWARE |
@@ -79,6 +78,8 @@ acpi_set_firmware_waking_vector(acpi_physical_address physical_address) | |||
79 | return_ACPI_STATUS(AE_OK); | 78 | return_ACPI_STATUS(AE_OK); |
80 | } | 79 | } |
81 | 80 | ||
81 | ACPI_EXPORT_SYMBOL(acpi_set_firmware_waking_vector) | ||
82 | |||
82 | /******************************************************************************* | 83 | /******************************************************************************* |
83 | * | 84 | * |
84 | * FUNCTION: acpi_get_firmware_waking_vector | 85 | * FUNCTION: acpi_get_firmware_waking_vector |
@@ -92,7 +93,6 @@ acpi_set_firmware_waking_vector(acpi_physical_address physical_address) | |||
92 | * DESCRIPTION: Access function for the firmware_waking_vector field in FACS | 93 | * DESCRIPTION: Access function for the firmware_waking_vector field in FACS |
93 | * | 94 | * |
94 | ******************************************************************************/ | 95 | ******************************************************************************/ |
95 | |||
96 | #ifdef ACPI_FUTURE_USAGE | 96 | #ifdef ACPI_FUTURE_USAGE |
97 | acpi_status | 97 | acpi_status |
98 | acpi_get_firmware_waking_vector(acpi_physical_address * physical_address) | 98 | acpi_get_firmware_waking_vector(acpi_physical_address * physical_address) |
@@ -118,6 +118,8 @@ acpi_get_firmware_waking_vector(acpi_physical_address * physical_address) | |||
118 | 118 | ||
119 | return_ACPI_STATUS(AE_OK); | 119 | return_ACPI_STATUS(AE_OK); |
120 | } | 120 | } |
121 | |||
122 | ACPI_EXPORT_SYMBOL(acpi_get_firmware_waking_vector) | ||
121 | #endif | 123 | #endif |
122 | 124 | ||
123 | /******************************************************************************* | 125 | /******************************************************************************* |
@@ -134,7 +136,6 @@ acpi_get_firmware_waking_vector(acpi_physical_address * physical_address) | |||
134 | * various OS-specific tasks between the two steps. | 136 | * various OS-specific tasks between the two steps. |
135 | * | 137 | * |
136 | ******************************************************************************/ | 138 | ******************************************************************************/ |
137 | |||
138 | acpi_status acpi_enter_sleep_state_prep(u8 sleep_state) | 139 | acpi_status acpi_enter_sleep_state_prep(u8 sleep_state) |
139 | { | 140 | { |
140 | acpi_status status; | 141 | acpi_status status; |
@@ -206,6 +207,8 @@ acpi_status acpi_enter_sleep_state_prep(u8 sleep_state) | |||
206 | return_ACPI_STATUS(AE_OK); | 207 | return_ACPI_STATUS(AE_OK); |
207 | } | 208 | } |
208 | 209 | ||
210 | ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state_prep) | ||
211 | |||
209 | /******************************************************************************* | 212 | /******************************************************************************* |
210 | * | 213 | * |
211 | * FUNCTION: acpi_enter_sleep_state | 214 | * FUNCTION: acpi_enter_sleep_state |
@@ -218,7 +221,6 @@ acpi_status acpi_enter_sleep_state_prep(u8 sleep_state) | |||
218 | * THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED | 221 | * THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED |
219 | * | 222 | * |
220 | ******************************************************************************/ | 223 | ******************************************************************************/ |
221 | |||
222 | acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state) | 224 | acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state) |
223 | { | 225 | { |
224 | u32 PM1Acontrol; | 226 | u32 PM1Acontrol; |
@@ -378,7 +380,7 @@ acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state) | |||
378 | return_ACPI_STATUS(AE_OK); | 380 | return_ACPI_STATUS(AE_OK); |
379 | } | 381 | } |
380 | 382 | ||
381 | EXPORT_SYMBOL(acpi_enter_sleep_state); | 383 | ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state) |
382 | 384 | ||
383 | /******************************************************************************* | 385 | /******************************************************************************* |
384 | * | 386 | * |
@@ -392,7 +394,6 @@ EXPORT_SYMBOL(acpi_enter_sleep_state); | |||
392 | * THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED | 394 | * THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED |
393 | * | 395 | * |
394 | ******************************************************************************/ | 396 | ******************************************************************************/ |
395 | |||
396 | acpi_status asmlinkage acpi_enter_sleep_state_s4bios(void) | 397 | acpi_status asmlinkage acpi_enter_sleep_state_s4bios(void) |
397 | { | 398 | { |
398 | u32 in_value; | 399 | u32 in_value; |
@@ -443,7 +444,7 @@ acpi_status asmlinkage acpi_enter_sleep_state_s4bios(void) | |||
443 | return_ACPI_STATUS(AE_OK); | 444 | return_ACPI_STATUS(AE_OK); |
444 | } | 445 | } |
445 | 446 | ||
446 | EXPORT_SYMBOL(acpi_enter_sleep_state_s4bios); | 447 | ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state_s4bios) |
447 | 448 | ||
448 | /******************************************************************************* | 449 | /******************************************************************************* |
449 | * | 450 | * |
@@ -457,7 +458,6 @@ EXPORT_SYMBOL(acpi_enter_sleep_state_s4bios); | |||
457 | * Called with interrupts ENABLED. | 458 | * Called with interrupts ENABLED. |
458 | * | 459 | * |
459 | ******************************************************************************/ | 460 | ******************************************************************************/ |
460 | |||
461 | acpi_status acpi_leave_sleep_state(u8 sleep_state) | 461 | acpi_status acpi_leave_sleep_state(u8 sleep_state) |
462 | { | 462 | { |
463 | struct acpi_object_list arg_list; | 463 | struct acpi_object_list arg_list; |
@@ -584,3 +584,5 @@ acpi_status acpi_leave_sleep_state(u8 sleep_state) | |||
584 | 584 | ||
585 | return_ACPI_STATUS(status); | 585 | return_ACPI_STATUS(status); |
586 | } | 586 | } |
587 | |||
588 | ACPI_EXPORT_SYMBOL(acpi_leave_sleep_state) | ||
diff --git a/drivers/acpi/hardware/hwtimer.c b/drivers/acpi/hardware/hwtimer.c index ef7c98e293a9..9d53e46bc331 100644 --- a/drivers/acpi/hardware/hwtimer.c +++ b/drivers/acpi/hardware/hwtimer.c | |||
@@ -42,7 +42,6 @@ | |||
42 | * POSSIBILITY OF SUCH DAMAGES. | 42 | * POSSIBILITY OF SUCH DAMAGES. |
43 | */ | 43 | */ |
44 | 44 | ||
45 | #include <linux/module.h> | ||
46 | #include <acpi/acpi.h> | 45 | #include <acpi/acpi.h> |
47 | 46 | ||
48 | #define _COMPONENT ACPI_HARDWARE | 47 | #define _COMPONENT ACPI_HARDWARE |
@@ -76,6 +75,8 @@ acpi_status acpi_get_timer_resolution(u32 * resolution) | |||
76 | return_ACPI_STATUS(AE_OK); | 75 | return_ACPI_STATUS(AE_OK); |
77 | } | 76 | } |
78 | 77 | ||
78 | ACPI_EXPORT_SYMBOL(acpi_get_timer_resolution) | ||
79 | |||
79 | /****************************************************************************** | 80 | /****************************************************************************** |
80 | * | 81 | * |
81 | * FUNCTION: acpi_get_timer | 82 | * FUNCTION: acpi_get_timer |
@@ -87,7 +88,6 @@ acpi_status acpi_get_timer_resolution(u32 * resolution) | |||
87 | * DESCRIPTION: Obtains current value of ACPI PM Timer (in ticks). | 88 | * DESCRIPTION: Obtains current value of ACPI PM Timer (in ticks). |
88 | * | 89 | * |
89 | ******************************************************************************/ | 90 | ******************************************************************************/ |
90 | |||
91 | acpi_status acpi_get_timer(u32 * ticks) | 91 | acpi_status acpi_get_timer(u32 * ticks) |
92 | { | 92 | { |
93 | acpi_status status; | 93 | acpi_status status; |
@@ -103,7 +103,7 @@ acpi_status acpi_get_timer(u32 * ticks) | |||
103 | return_ACPI_STATUS(status); | 103 | return_ACPI_STATUS(status); |
104 | } | 104 | } |
105 | 105 | ||
106 | EXPORT_SYMBOL(acpi_get_timer); | 106 | ACPI_EXPORT_SYMBOL(acpi_get_timer) |
107 | 107 | ||
108 | /****************************************************************************** | 108 | /****************************************************************************** |
109 | * | 109 | * |
@@ -133,7 +133,6 @@ EXPORT_SYMBOL(acpi_get_timer); | |||
133 | * 2**32 Ticks / 3,600,000 Ticks/Sec = 1193 sec or 19.88 minutes | 133 | * 2**32 Ticks / 3,600,000 Ticks/Sec = 1193 sec or 19.88 minutes |
134 | * | 134 | * |
135 | ******************************************************************************/ | 135 | ******************************************************************************/ |
136 | |||
137 | acpi_status | 136 | acpi_status |
138 | acpi_get_timer_duration(u32 start_ticks, u32 end_ticks, u32 * time_elapsed) | 137 | acpi_get_timer_duration(u32 start_ticks, u32 end_ticks, u32 * time_elapsed) |
139 | { | 138 | { |
@@ -184,4 +183,4 @@ acpi_get_timer_duration(u32 start_ticks, u32 end_ticks, u32 * time_elapsed) | |||
184 | return_ACPI_STATUS(status); | 183 | return_ACPI_STATUS(status); |
185 | } | 184 | } |
186 | 185 | ||
187 | EXPORT_SYMBOL(acpi_get_timer_duration); | 186 | ACPI_EXPORT_SYMBOL(acpi_get_timer_duration) |
diff --git a/drivers/acpi/namespace/nsaccess.c b/drivers/acpi/namespace/nsaccess.c index 6bdad8bfcf0b..d4914fda6a37 100644 --- a/drivers/acpi/namespace/nsaccess.c +++ b/drivers/acpi/namespace/nsaccess.c | |||
@@ -347,14 +347,17 @@ acpi_ns_lookup(union acpi_generic_state *scope_info, | |||
347 | return_ACPI_STATUS(AE_AML_INTERNAL); | 347 | return_ACPI_STATUS(AE_AML_INTERNAL); |
348 | } | 348 | } |
349 | 349 | ||
350 | /* | 350 | if (!(flags & ACPI_NS_PREFIX_IS_SCOPE)) { |
351 | * This node might not be a actual "scope" node (such as a | 351 | /* |
352 | * Device/Method, etc.) It could be a Package or other object node. | 352 | * This node might not be a actual "scope" node (such as a |
353 | * Backup up the tree to find the containing scope node. | 353 | * Device/Method, etc.) It could be a Package or other object node. |
354 | */ | 354 | * Backup up the tree to find the containing scope node. |
355 | while (!acpi_ns_opens_scope(prefix_node->type) && | 355 | */ |
356 | prefix_node->type != ACPI_TYPE_ANY) { | 356 | while (!acpi_ns_opens_scope(prefix_node->type) && |
357 | prefix_node = acpi_ns_get_parent_node(prefix_node); | 357 | prefix_node->type != ACPI_TYPE_ANY) { |
358 | prefix_node = | ||
359 | acpi_ns_get_parent_node(prefix_node); | ||
360 | } | ||
358 | } | 361 | } |
359 | } | 362 | } |
360 | 363 | ||
diff --git a/drivers/acpi/namespace/nsalloc.c b/drivers/acpi/namespace/nsalloc.c index cd26cb971a1c..acd4b6732ac4 100644 --- a/drivers/acpi/namespace/nsalloc.c +++ b/drivers/acpi/namespace/nsalloc.c | |||
@@ -68,7 +68,7 @@ struct acpi_namespace_node *acpi_ns_create_node(u32 name) | |||
68 | 68 | ||
69 | ACPI_FUNCTION_TRACE("ns_create_node"); | 69 | ACPI_FUNCTION_TRACE("ns_create_node"); |
70 | 70 | ||
71 | node = ACPI_MEM_CALLOCATE(sizeof(struct acpi_namespace_node)); | 71 | node = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_namespace_node)); |
72 | if (!node) { | 72 | if (!node) { |
73 | return_PTR(NULL); | 73 | return_PTR(NULL); |
74 | } | 74 | } |
@@ -142,7 +142,7 @@ void acpi_ns_delete_node(struct acpi_namespace_node *node) | |||
142 | * Detach an object if there is one then delete the node | 142 | * Detach an object if there is one then delete the node |
143 | */ | 143 | */ |
144 | acpi_ns_detach_object(node); | 144 | acpi_ns_detach_object(node); |
145 | ACPI_MEM_FREE(node); | 145 | ACPI_FREE(node); |
146 | return_VOID; | 146 | return_VOID; |
147 | } | 147 | } |
148 | 148 | ||
@@ -311,7 +311,7 @@ void acpi_ns_delete_children(struct acpi_namespace_node *parent_node) | |||
311 | 311 | ||
312 | /* Now we can delete the node */ | 312 | /* Now we can delete the node */ |
313 | 313 | ||
314 | ACPI_MEM_FREE(child_node); | 314 | ACPI_FREE(child_node); |
315 | 315 | ||
316 | /* And move on to the next child in the list */ | 316 | /* And move on to the next child in the list */ |
317 | 317 | ||
diff --git a/drivers/acpi/namespace/nsdumpdv.c b/drivers/acpi/namespace/nsdumpdv.c index aff899a935e3..2b311da01ef5 100644 --- a/drivers/acpi/namespace/nsdumpdv.c +++ b/drivers/acpi/namespace/nsdumpdv.c | |||
@@ -92,7 +92,7 @@ acpi_ns_dump_one_device(acpi_handle obj_handle, | |||
92 | info->hardware_id.value, | 92 | info->hardware_id.value, |
93 | ACPI_FORMAT_UINT64(info->address), | 93 | ACPI_FORMAT_UINT64(info->address), |
94 | info->current_status)); | 94 | info->current_status)); |
95 | ACPI_MEM_FREE(info); | 95 | ACPI_FREE(info); |
96 | } | 96 | } |
97 | 97 | ||
98 | return (status); | 98 | return (status); |
diff --git a/drivers/acpi/namespace/nseval.c b/drivers/acpi/namespace/nseval.c index 80ef95545636..f5d8e71b82cc 100644 --- a/drivers/acpi/namespace/nseval.c +++ b/drivers/acpi/namespace/nseval.c | |||
@@ -151,7 +151,7 @@ acpi_ns_evaluate_relative(char *pathname, struct acpi_parameter_info *info) | |||
151 | acpi_ut_delete_generic_state(scope_info); | 151 | acpi_ut_delete_generic_state(scope_info); |
152 | 152 | ||
153 | cleanup1: | 153 | cleanup1: |
154 | ACPI_MEM_FREE(internal_path); | 154 | ACPI_FREE(internal_path); |
155 | return_ACPI_STATUS(status); | 155 | return_ACPI_STATUS(status); |
156 | } | 156 | } |
157 | 157 | ||
@@ -228,7 +228,7 @@ acpi_ns_evaluate_by_name(char *pathname, struct acpi_parameter_info *info) | |||
228 | /* Cleanup */ | 228 | /* Cleanup */ |
229 | 229 | ||
230 | if (internal_path) { | 230 | if (internal_path) { |
231 | ACPI_MEM_FREE(internal_path); | 231 | ACPI_FREE(internal_path); |
232 | } | 232 | } |
233 | 233 | ||
234 | return_ACPI_STATUS(status); | 234 | return_ACPI_STATUS(status); |
diff --git a/drivers/acpi/namespace/nsinit.c b/drivers/acpi/namespace/nsinit.c index 9aa337c33887..57b2537643c7 100644 --- a/drivers/acpi/namespace/nsinit.c +++ b/drivers/acpi/namespace/nsinit.c | |||
@@ -424,7 +424,7 @@ acpi_ns_init_one_device(acpi_handle obj_handle, | |||
424 | ACPI_WARNING((AE_INFO, "%s._INI failed: %s", | 424 | ACPI_WARNING((AE_INFO, "%s._INI failed: %s", |
425 | scope_name, acpi_format_exception(status))); | 425 | scope_name, acpi_format_exception(status))); |
426 | 426 | ||
427 | ACPI_MEM_FREE(scope_name); | 427 | ACPI_FREE(scope_name); |
428 | #endif | 428 | #endif |
429 | } else { | 429 | } else { |
430 | /* Delete any return object (especially if implicit_return is enabled) */ | 430 | /* Delete any return object (especially if implicit_return is enabled) */ |
diff --git a/drivers/acpi/namespace/nsnames.c b/drivers/acpi/namespace/nsnames.c index 639f653b4b6b..ba812f43897f 100644 --- a/drivers/acpi/namespace/nsnames.c +++ b/drivers/acpi/namespace/nsnames.c | |||
@@ -48,11 +48,6 @@ | |||
48 | #define _COMPONENT ACPI_NAMESPACE | 48 | #define _COMPONENT ACPI_NAMESPACE |
49 | ACPI_MODULE_NAME("nsnames") | 49 | ACPI_MODULE_NAME("nsnames") |
50 | 50 | ||
51 | /* Local prototypes */ | ||
52 | static void | ||
53 | acpi_ns_build_external_path(struct acpi_namespace_node *node, | ||
54 | acpi_size size, char *name_buffer); | ||
55 | |||
56 | /******************************************************************************* | 51 | /******************************************************************************* |
57 | * | 52 | * |
58 | * FUNCTION: acpi_ns_build_external_path | 53 | * FUNCTION: acpi_ns_build_external_path |
@@ -67,8 +62,7 @@ acpi_ns_build_external_path(struct acpi_namespace_node *node, | |||
67 | * DESCRIPTION: Generate a full pathaname | 62 | * DESCRIPTION: Generate a full pathaname |
68 | * | 63 | * |
69 | ******************************************************************************/ | 64 | ******************************************************************************/ |
70 | 65 | void | |
71 | static void | ||
72 | acpi_ns_build_external_path(struct acpi_namespace_node *node, | 66 | acpi_ns_build_external_path(struct acpi_namespace_node *node, |
73 | acpi_size size, char *name_buffer) | 67 | acpi_size size, char *name_buffer) |
74 | { | 68 | { |
@@ -146,7 +140,7 @@ char *acpi_ns_get_external_pathname(struct acpi_namespace_node *node) | |||
146 | 140 | ||
147 | /* Allocate a buffer to be returned to caller */ | 141 | /* Allocate a buffer to be returned to caller */ |
148 | 142 | ||
149 | name_buffer = ACPI_MEM_CALLOCATE(size); | 143 | name_buffer = ACPI_ALLOCATE_ZEROED(size); |
150 | if (!name_buffer) { | 144 | if (!name_buffer) { |
151 | ACPI_ERROR((AE_INFO, "Allocation failure")); | 145 | ACPI_ERROR((AE_INFO, "Allocation failure")); |
152 | return_PTR(NULL); | 146 | return_PTR(NULL); |
diff --git a/drivers/acpi/namespace/nsparse.c b/drivers/acpi/namespace/nsparse.c index 232be4303653..64daf3028dea 100644 --- a/drivers/acpi/namespace/nsparse.c +++ b/drivers/acpi/namespace/nsparse.c | |||
@@ -62,7 +62,7 @@ ACPI_MODULE_NAME("nsparse") | |||
62 | * | 62 | * |
63 | ******************************************************************************/ | 63 | ******************************************************************************/ |
64 | acpi_status | 64 | acpi_status |
65 | acpi_ns_one_complete_parse(u8 pass_number, struct acpi_table_desc * table_desc) | 65 | acpi_ns_one_complete_parse(u8 pass_number, struct acpi_table_desc *table_desc) |
66 | { | 66 | { |
67 | union acpi_parse_object *parse_root; | 67 | union acpi_parse_object *parse_root; |
68 | acpi_status status; | 68 | acpi_status status; |
diff --git a/drivers/acpi/namespace/nssearch.c b/drivers/acpi/namespace/nssearch.c index f73a3d566168..c929f45071c0 100644 --- a/drivers/acpi/namespace/nssearch.c +++ b/drivers/acpi/namespace/nssearch.c | |||
@@ -103,7 +103,7 @@ acpi_ns_search_node(u32 target_name, | |||
103 | &target_name), | 103 | &target_name), |
104 | acpi_ut_get_type_name(type))); | 104 | acpi_ut_get_type_name(type))); |
105 | 105 | ||
106 | ACPI_MEM_FREE(scope_name); | 106 | ACPI_FREE(scope_name); |
107 | } | 107 | } |
108 | } | 108 | } |
109 | #endif | 109 | #endif |
diff --git a/drivers/acpi/namespace/nsutils.c b/drivers/acpi/namespace/nsutils.c index 123f454b14ab..586014ecf24b 100644 --- a/drivers/acpi/namespace/nsutils.c +++ b/drivers/acpi/namespace/nsutils.c | |||
@@ -104,7 +104,7 @@ acpi_ns_report_error(char *module_name, | |||
104 | } | 104 | } |
105 | 105 | ||
106 | if (name) { | 106 | if (name) { |
107 | ACPI_MEM_FREE(name); | 107 | ACPI_FREE(name); |
108 | } | 108 | } |
109 | } | 109 | } |
110 | 110 | ||
@@ -187,7 +187,7 @@ acpi_ns_print_node_pathname(struct acpi_namespace_node *node, char *message) | |||
187 | } | 187 | } |
188 | 188 | ||
189 | acpi_os_printf("[%s] (Node %p)", (char *)buffer.pointer, node); | 189 | acpi_os_printf("[%s] (Node %p)", (char *)buffer.pointer, node); |
190 | ACPI_MEM_FREE(buffer.pointer); | 190 | ACPI_FREE(buffer.pointer); |
191 | } | 191 | } |
192 | } | 192 | } |
193 | 193 | ||
@@ -490,7 +490,7 @@ acpi_status acpi_ns_internalize_name(char *external_name, char **converted_name) | |||
490 | 490 | ||
491 | /* We need a segment to store the internal name */ | 491 | /* We need a segment to store the internal name */ |
492 | 492 | ||
493 | internal_name = ACPI_MEM_CALLOCATE(info.length); | 493 | internal_name = ACPI_ALLOCATE_ZEROED(info.length); |
494 | if (!internal_name) { | 494 | if (!internal_name) { |
495 | return_ACPI_STATUS(AE_NO_MEMORY); | 495 | return_ACPI_STATUS(AE_NO_MEMORY); |
496 | } | 496 | } |
@@ -500,7 +500,7 @@ acpi_status acpi_ns_internalize_name(char *external_name, char **converted_name) | |||
500 | info.internal_name = internal_name; | 500 | info.internal_name = internal_name; |
501 | status = acpi_ns_build_internal_name(&info); | 501 | status = acpi_ns_build_internal_name(&info); |
502 | if (ACPI_FAILURE(status)) { | 502 | if (ACPI_FAILURE(status)) { |
503 | ACPI_MEM_FREE(internal_name); | 503 | ACPI_FREE(internal_name); |
504 | return_ACPI_STATUS(status); | 504 | return_ACPI_STATUS(status); |
505 | } | 505 | } |
506 | 506 | ||
@@ -632,7 +632,7 @@ acpi_ns_externalize_name(u32 internal_name_length, | |||
632 | /* | 632 | /* |
633 | * Build converted_name | 633 | * Build converted_name |
634 | */ | 634 | */ |
635 | *converted_name = ACPI_MEM_CALLOCATE(required_length); | 635 | *converted_name = ACPI_ALLOCATE_ZEROED(required_length); |
636 | if (!(*converted_name)) { | 636 | if (!(*converted_name)) { |
637 | return_ACPI_STATUS(AE_NO_MEMORY); | 637 | return_ACPI_STATUS(AE_NO_MEMORY); |
638 | } | 638 | } |
@@ -879,7 +879,7 @@ acpi_ns_get_node_by_path(char *pathname, | |||
879 | 879 | ||
880 | cleanup: | 880 | cleanup: |
881 | if (internal_path) { | 881 | if (internal_path) { |
882 | ACPI_MEM_FREE(internal_path); | 882 | ACPI_FREE(internal_path); |
883 | } | 883 | } |
884 | return_ACPI_STATUS(status); | 884 | return_ACPI_STATUS(status); |
885 | } | 885 | } |
diff --git a/drivers/acpi/namespace/nsxfeval.c b/drivers/acpi/namespace/nsxfeval.c index 71e7769d7daf..7cdedc96a40a 100644 --- a/drivers/acpi/namespace/nsxfeval.c +++ b/drivers/acpi/namespace/nsxfeval.c | |||
@@ -42,8 +42,6 @@ | |||
42 | * POSSIBILITY OF SUCH DAMAGES. | 42 | * POSSIBILITY OF SUCH DAMAGES. |
43 | */ | 43 | */ |
44 | 44 | ||
45 | #include <linux/module.h> | ||
46 | |||
47 | #include <acpi/acpi.h> | 45 | #include <acpi/acpi.h> |
48 | #include <acpi/acnamesp.h> | 46 | #include <acpi/acnamesp.h> |
49 | #include <acpi/acinterp.h> | 47 | #include <acpi/acinterp.h> |
@@ -51,6 +49,7 @@ | |||
51 | #define _COMPONENT ACPI_NAMESPACE | 49 | #define _COMPONENT ACPI_NAMESPACE |
52 | ACPI_MODULE_NAME("nsxfeval") | 50 | ACPI_MODULE_NAME("nsxfeval") |
53 | 51 | ||
52 | #ifdef ACPI_FUTURE_USAGE | ||
54 | /******************************************************************************* | 53 | /******************************************************************************* |
55 | * | 54 | * |
56 | * FUNCTION: acpi_evaluate_object_typed | 55 | * FUNCTION: acpi_evaluate_object_typed |
@@ -71,12 +70,11 @@ ACPI_MODULE_NAME("nsxfeval") | |||
71 | * be valid (non-null) | 70 | * be valid (non-null) |
72 | * | 71 | * |
73 | ******************************************************************************/ | 72 | ******************************************************************************/ |
74 | #ifdef ACPI_FUTURE_USAGE | ||
75 | acpi_status | 73 | acpi_status |
76 | acpi_evaluate_object_typed(acpi_handle handle, | 74 | acpi_evaluate_object_typed(acpi_handle handle, |
77 | acpi_string pathname, | 75 | acpi_string pathname, |
78 | struct acpi_object_list *external_params, | 76 | struct acpi_object_list * external_params, |
79 | struct acpi_buffer *return_buffer, | 77 | struct acpi_buffer * return_buffer, |
80 | acpi_object_type return_type) | 78 | acpi_object_type return_type) |
81 | { | 79 | { |
82 | acpi_status status; | 80 | acpi_status status; |
@@ -142,6 +140,8 @@ acpi_evaluate_object_typed(acpi_handle handle, | |||
142 | return_buffer->length = 0; | 140 | return_buffer->length = 0; |
143 | return_ACPI_STATUS(AE_TYPE); | 141 | return_ACPI_STATUS(AE_TYPE); |
144 | } | 142 | } |
143 | |||
144 | ACPI_EXPORT_SYMBOL(acpi_evaluate_object_typed) | ||
145 | #endif /* ACPI_FUTURE_USAGE */ | 145 | #endif /* ACPI_FUTURE_USAGE */ |
146 | 146 | ||
147 | /******************************************************************************* | 147 | /******************************************************************************* |
@@ -163,7 +163,6 @@ acpi_evaluate_object_typed(acpi_handle handle, | |||
163 | * be valid (non-null) | 163 | * be valid (non-null) |
164 | * | 164 | * |
165 | ******************************************************************************/ | 165 | ******************************************************************************/ |
166 | |||
167 | acpi_status | 166 | acpi_status |
168 | acpi_evaluate_object(acpi_handle handle, | 167 | acpi_evaluate_object(acpi_handle handle, |
169 | acpi_string pathname, | 168 | acpi_string pathname, |
@@ -193,9 +192,9 @@ acpi_evaluate_object(acpi_handle handle, | |||
193 | * Allocate a new parameter block for the internal objects | 192 | * Allocate a new parameter block for the internal objects |
194 | * Add 1 to count to allow for null terminated internal list | 193 | * Add 1 to count to allow for null terminated internal list |
195 | */ | 194 | */ |
196 | info.parameters = ACPI_MEM_CALLOCATE(((acpi_size) | 195 | info.parameters = ACPI_ALLOCATE_ZEROED(((acpi_size) |
197 | external_params->count + | 196 | external_params->count + |
198 | 1) * sizeof(void *)); | 197 | 1) * sizeof(void *)); |
199 | if (!info.parameters) { | 198 | if (!info.parameters) { |
200 | return_ACPI_STATUS(AE_NO_MEMORY); | 199 | return_ACPI_STATUS(AE_NO_MEMORY); |
201 | } | 200 | } |
@@ -356,7 +355,7 @@ acpi_evaluate_object(acpi_handle handle, | |||
356 | return_ACPI_STATUS(status); | 355 | return_ACPI_STATUS(status); |
357 | } | 356 | } |
358 | 357 | ||
359 | EXPORT_SYMBOL(acpi_evaluate_object); | 358 | ACPI_EXPORT_SYMBOL(acpi_evaluate_object) |
360 | 359 | ||
361 | /******************************************************************************* | 360 | /******************************************************************************* |
362 | * | 361 | * |
@@ -387,7 +386,6 @@ EXPORT_SYMBOL(acpi_evaluate_object); | |||
387 | * function, etc. | 386 | * function, etc. |
388 | * | 387 | * |
389 | ******************************************************************************/ | 388 | ******************************************************************************/ |
390 | |||
391 | acpi_status | 389 | acpi_status |
392 | acpi_walk_namespace(acpi_object_type type, | 390 | acpi_walk_namespace(acpi_object_type type, |
393 | acpi_handle start_object, | 391 | acpi_handle start_object, |
@@ -424,7 +422,7 @@ acpi_walk_namespace(acpi_object_type type, | |||
424 | return_ACPI_STATUS(status); | 422 | return_ACPI_STATUS(status); |
425 | } | 423 | } |
426 | 424 | ||
427 | EXPORT_SYMBOL(acpi_walk_namespace); | 425 | ACPI_EXPORT_SYMBOL(acpi_walk_namespace) |
428 | 426 | ||
429 | /******************************************************************************* | 427 | /******************************************************************************* |
430 | * | 428 | * |
@@ -439,7 +437,6 @@ EXPORT_SYMBOL(acpi_walk_namespace); | |||
439 | * on that. | 437 | * on that. |
440 | * | 438 | * |
441 | ******************************************************************************/ | 439 | ******************************************************************************/ |
442 | |||
443 | static acpi_status | 440 | static acpi_status |
444 | acpi_ns_get_device_callback(acpi_handle obj_handle, | 441 | acpi_ns_get_device_callback(acpi_handle obj_handle, |
445 | u32 nesting_level, | 442 | u32 nesting_level, |
@@ -510,11 +507,11 @@ acpi_ns_get_device_callback(acpi_handle obj_handle, | |||
510 | sizeof(struct | 507 | sizeof(struct |
511 | acpi_compatible_id)) != | 508 | acpi_compatible_id)) != |
512 | 0) { | 509 | 0) { |
513 | ACPI_MEM_FREE(cid); | 510 | ACPI_FREE(cid); |
514 | return (AE_OK); | 511 | return (AE_OK); |
515 | } | 512 | } |
516 | } | 513 | } |
517 | ACPI_MEM_FREE(cid); | 514 | ACPI_FREE(cid); |
518 | } | 515 | } |
519 | } | 516 | } |
520 | 517 | ||
@@ -592,7 +589,7 @@ acpi_get_devices(char *HID, | |||
592 | return_ACPI_STATUS(status); | 589 | return_ACPI_STATUS(status); |
593 | } | 590 | } |
594 | 591 | ||
595 | EXPORT_SYMBOL(acpi_get_devices); | 592 | ACPI_EXPORT_SYMBOL(acpi_get_devices) |
596 | 593 | ||
597 | /******************************************************************************* | 594 | /******************************************************************************* |
598 | * | 595 | * |
@@ -607,7 +604,6 @@ EXPORT_SYMBOL(acpi_get_devices); | |||
607 | * DESCRIPTION: Attach arbitrary data and handler to a namespace node. | 604 | * DESCRIPTION: Attach arbitrary data and handler to a namespace node. |
608 | * | 605 | * |
609 | ******************************************************************************/ | 606 | ******************************************************************************/ |
610 | |||
611 | acpi_status | 607 | acpi_status |
612 | acpi_attach_data(acpi_handle obj_handle, | 608 | acpi_attach_data(acpi_handle obj_handle, |
613 | acpi_object_handler handler, void *data) | 609 | acpi_object_handler handler, void *data) |
@@ -641,6 +637,8 @@ acpi_attach_data(acpi_handle obj_handle, | |||
641 | return (status); | 637 | return (status); |
642 | } | 638 | } |
643 | 639 | ||
640 | ACPI_EXPORT_SYMBOL(acpi_attach_data) | ||
641 | |||
644 | /******************************************************************************* | 642 | /******************************************************************************* |
645 | * | 643 | * |
646 | * FUNCTION: acpi_detach_data | 644 | * FUNCTION: acpi_detach_data |
@@ -653,7 +651,6 @@ acpi_attach_data(acpi_handle obj_handle, | |||
653 | * DESCRIPTION: Remove data that was previously attached to a node. | 651 | * DESCRIPTION: Remove data that was previously attached to a node. |
654 | * | 652 | * |
655 | ******************************************************************************/ | 653 | ******************************************************************************/ |
656 | |||
657 | acpi_status | 654 | acpi_status |
658 | acpi_detach_data(acpi_handle obj_handle, acpi_object_handler handler) | 655 | acpi_detach_data(acpi_handle obj_handle, acpi_object_handler handler) |
659 | { | 656 | { |
@@ -686,6 +683,8 @@ acpi_detach_data(acpi_handle obj_handle, acpi_object_handler handler) | |||
686 | return (status); | 683 | return (status); |
687 | } | 684 | } |
688 | 685 | ||
686 | ACPI_EXPORT_SYMBOL(acpi_detach_data) | ||
687 | |||
689 | /******************************************************************************* | 688 | /******************************************************************************* |
690 | * | 689 | * |
691 | * FUNCTION: acpi_get_data | 690 | * FUNCTION: acpi_get_data |
@@ -699,7 +698,6 @@ acpi_detach_data(acpi_handle obj_handle, acpi_object_handler handler) | |||
699 | * DESCRIPTION: Retrieve data that was previously attached to a namespace node. | 698 | * DESCRIPTION: Retrieve data that was previously attached to a namespace node. |
700 | * | 699 | * |
701 | ******************************************************************************/ | 700 | ******************************************************************************/ |
702 | |||
703 | acpi_status | 701 | acpi_status |
704 | acpi_get_data(acpi_handle obj_handle, acpi_object_handler handler, void **data) | 702 | acpi_get_data(acpi_handle obj_handle, acpi_object_handler handler, void **data) |
705 | { | 703 | { |
@@ -731,3 +729,5 @@ acpi_get_data(acpi_handle obj_handle, acpi_object_handler handler, void **data) | |||
731 | (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); | 729 | (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); |
732 | return (status); | 730 | return (status); |
733 | } | 731 | } |
732 | |||
733 | ACPI_EXPORT_SYMBOL(acpi_get_data) | ||
diff --git a/drivers/acpi/namespace/nsxfname.c b/drivers/acpi/namespace/nsxfname.c index 55d26624ab9f..1303e2b062bb 100644 --- a/drivers/acpi/namespace/nsxfname.c +++ b/drivers/acpi/namespace/nsxfname.c | |||
@@ -42,8 +42,6 @@ | |||
42 | * POSSIBILITY OF SUCH DAMAGES. | 42 | * POSSIBILITY OF SUCH DAMAGES. |
43 | */ | 43 | */ |
44 | 44 | ||
45 | #include <linux/module.h> | ||
46 | |||
47 | #include <acpi/acpi.h> | 45 | #include <acpi/acpi.h> |
48 | #include <acpi/acnamesp.h> | 46 | #include <acpi/acnamesp.h> |
49 | 47 | ||
@@ -126,7 +124,7 @@ acpi_get_handle(acpi_handle parent, | |||
126 | return (status); | 124 | return (status); |
127 | } | 125 | } |
128 | 126 | ||
129 | EXPORT_SYMBOL(acpi_get_handle); | 127 | ACPI_EXPORT_SYMBOL(acpi_get_handle) |
130 | 128 | ||
131 | /****************************************************************************** | 129 | /****************************************************************************** |
132 | * | 130 | * |
@@ -143,7 +141,6 @@ EXPORT_SYMBOL(acpi_get_handle); | |||
143 | * complementary functions. | 141 | * complementary functions. |
144 | * | 142 | * |
145 | ******************************************************************************/ | 143 | ******************************************************************************/ |
146 | |||
147 | acpi_status | 144 | acpi_status |
148 | acpi_get_name(acpi_handle handle, u32 name_type, struct acpi_buffer * buffer) | 145 | acpi_get_name(acpi_handle handle, u32 name_type, struct acpi_buffer * buffer) |
149 | { | 146 | { |
@@ -204,7 +201,7 @@ acpi_get_name(acpi_handle handle, u32 name_type, struct acpi_buffer * buffer) | |||
204 | return (status); | 201 | return (status); |
205 | } | 202 | } |
206 | 203 | ||
207 | EXPORT_SYMBOL(acpi_get_name); | 204 | ACPI_EXPORT_SYMBOL(acpi_get_name) |
208 | 205 | ||
209 | /****************************************************************************** | 206 | /****************************************************************************** |
210 | * | 207 | * |
@@ -220,7 +217,6 @@ EXPORT_SYMBOL(acpi_get_name); | |||
220 | * control methods (Such as in the case of a device.) | 217 | * control methods (Such as in the case of a device.) |
221 | * | 218 | * |
222 | ******************************************************************************/ | 219 | ******************************************************************************/ |
223 | |||
224 | acpi_status | 220 | acpi_status |
225 | acpi_get_object_info(acpi_handle handle, struct acpi_buffer * buffer) | 221 | acpi_get_object_info(acpi_handle handle, struct acpi_buffer * buffer) |
226 | { | 222 | { |
@@ -242,7 +238,7 @@ acpi_get_object_info(acpi_handle handle, struct acpi_buffer * buffer) | |||
242 | return (status); | 238 | return (status); |
243 | } | 239 | } |
244 | 240 | ||
245 | info = ACPI_MEM_CALLOCATE(sizeof(struct acpi_device_info)); | 241 | info = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_device_info)); |
246 | if (!info) { | 242 | if (!info) { |
247 | return (AE_NO_MEMORY); | 243 | return (AE_NO_MEMORY); |
248 | } | 244 | } |
@@ -346,11 +342,11 @@ acpi_get_object_info(acpi_handle handle, struct acpi_buffer * buffer) | |||
346 | } | 342 | } |
347 | 343 | ||
348 | cleanup: | 344 | cleanup: |
349 | ACPI_MEM_FREE(info); | 345 | ACPI_FREE(info); |
350 | if (cid_list) { | 346 | if (cid_list) { |
351 | ACPI_MEM_FREE(cid_list); | 347 | ACPI_FREE(cid_list); |
352 | } | 348 | } |
353 | return (status); | 349 | return (status); |
354 | } | 350 | } |
355 | 351 | ||
356 | EXPORT_SYMBOL(acpi_get_object_info); | 352 | ACPI_EXPORT_SYMBOL(acpi_get_object_info) |
diff --git a/drivers/acpi/namespace/nsxfobj.c b/drivers/acpi/namespace/nsxfobj.c index 9c5f3302799c..a163e1d3708d 100644 --- a/drivers/acpi/namespace/nsxfobj.c +++ b/drivers/acpi/namespace/nsxfobj.c | |||
@@ -42,8 +42,6 @@ | |||
42 | * POSSIBILITY OF SUCH DAMAGES. | 42 | * POSSIBILITY OF SUCH DAMAGES. |
43 | */ | 43 | */ |
44 | 44 | ||
45 | #include <linux/module.h> | ||
46 | |||
47 | #include <acpi/acpi.h> | 45 | #include <acpi/acpi.h> |
48 | #include <acpi/acnamesp.h> | 46 | #include <acpi/acnamesp.h> |
49 | 47 | ||
@@ -101,7 +99,7 @@ acpi_status acpi_get_type(acpi_handle handle, acpi_object_type * ret_type) | |||
101 | return (status); | 99 | return (status); |
102 | } | 100 | } |
103 | 101 | ||
104 | EXPORT_SYMBOL(acpi_get_type); | 102 | ACPI_EXPORT_SYMBOL(acpi_get_type) |
105 | 103 | ||
106 | /******************************************************************************* | 104 | /******************************************************************************* |
107 | * | 105 | * |
@@ -116,7 +114,6 @@ EXPORT_SYMBOL(acpi_get_type); | |||
116 | * Handle. | 114 | * Handle. |
117 | * | 115 | * |
118 | ******************************************************************************/ | 116 | ******************************************************************************/ |
119 | |||
120 | acpi_status acpi_get_parent(acpi_handle handle, acpi_handle * ret_handle) | 117 | acpi_status acpi_get_parent(acpi_handle handle, acpi_handle * ret_handle) |
121 | { | 118 | { |
122 | struct acpi_namespace_node *node; | 119 | struct acpi_namespace_node *node; |
@@ -162,7 +159,7 @@ acpi_status acpi_get_parent(acpi_handle handle, acpi_handle * ret_handle) | |||
162 | return (status); | 159 | return (status); |
163 | } | 160 | } |
164 | 161 | ||
165 | EXPORT_SYMBOL(acpi_get_parent); | 162 | ACPI_EXPORT_SYMBOL(acpi_get_parent) |
166 | 163 | ||
167 | /******************************************************************************* | 164 | /******************************************************************************* |
168 | * | 165 | * |
@@ -181,7 +178,6 @@ EXPORT_SYMBOL(acpi_get_parent); | |||
181 | * Scope is returned. | 178 | * Scope is returned. |
182 | * | 179 | * |
183 | ******************************************************************************/ | 180 | ******************************************************************************/ |
184 | |||
185 | acpi_status | 181 | acpi_status |
186 | acpi_get_next_object(acpi_object_type type, | 182 | acpi_get_next_object(acpi_object_type type, |
187 | acpi_handle parent, | 183 | acpi_handle parent, |
@@ -243,4 +239,4 @@ acpi_get_next_object(acpi_object_type type, | |||
243 | return (status); | 239 | return (status); |
244 | } | 240 | } |
245 | 241 | ||
246 | EXPORT_SYMBOL(acpi_get_next_object); | 242 | ACPI_EXPORT_SYMBOL(acpi_get_next_object) |
diff --git a/drivers/acpi/parser/pstree.c b/drivers/acpi/parser/pstree.c index 6aa0012643ce..0015717ef096 100644 --- a/drivers/acpi/parser/pstree.c +++ b/drivers/acpi/parser/pstree.c | |||
@@ -306,5 +306,4 @@ union acpi_parse_object *acpi_ps_get_child(union acpi_parse_object *op) | |||
306 | return (child); | 306 | return (child); |
307 | } | 307 | } |
308 | #endif | 308 | #endif |
309 | |||
310 | #endif /* ACPI_FUTURE_USAGE */ | 309 | #endif /* ACPI_FUTURE_USAGE */ |
diff --git a/drivers/acpi/resources/rsinfo.c b/drivers/acpi/resources/rsinfo.c index d9ae64b77bd9..9e7ae2f8a1d3 100644 --- a/drivers/acpi/resources/rsinfo.c +++ b/drivers/acpi/resources/rsinfo.c | |||
@@ -141,6 +141,7 @@ struct acpi_rsdump_info *acpi_gbl_dump_resource_dispatch[] = { | |||
141 | acpi_rs_dump_generic_reg, /* ACPI_RESOURCE_TYPE_GENERIC_REGISTER */ | 141 | acpi_rs_dump_generic_reg, /* ACPI_RESOURCE_TYPE_GENERIC_REGISTER */ |
142 | }; | 142 | }; |
143 | #endif | 143 | #endif |
144 | |||
144 | #endif /* ACPI_FUTURE_USAGE */ | 145 | #endif /* ACPI_FUTURE_USAGE */ |
145 | /* | 146 | /* |
146 | * Base sizes for external AML resource descriptors, indexed by internal type. | 147 | * Base sizes for external AML resource descriptors, indexed by internal type. |
diff --git a/drivers/acpi/resources/rsxface.c b/drivers/acpi/resources/rsxface.c index 2e1bc71acd94..b3feebbd8ca2 100644 --- a/drivers/acpi/resources/rsxface.c +++ b/drivers/acpi/resources/rsxface.c | |||
@@ -41,8 +41,6 @@ | |||
41 | * POSSIBILITY OF SUCH DAMAGES. | 41 | * POSSIBILITY OF SUCH DAMAGES. |
42 | */ | 42 | */ |
43 | 43 | ||
44 | #include <linux/module.h> | ||
45 | |||
46 | #include <acpi/acpi.h> | 44 | #include <acpi/acpi.h> |
47 | #include <acpi/acresrc.h> | 45 | #include <acpi/acresrc.h> |
48 | 46 | ||
@@ -118,6 +116,8 @@ acpi_get_irq_routing_table(acpi_handle device_handle, | |||
118 | return_ACPI_STATUS(status); | 116 | return_ACPI_STATUS(status); |
119 | } | 117 | } |
120 | 118 | ||
119 | ACPI_EXPORT_SYMBOL(acpi_get_irq_routing_table) | ||
120 | |||
121 | /******************************************************************************* | 121 | /******************************************************************************* |
122 | * | 122 | * |
123 | * FUNCTION: acpi_get_current_resources | 123 | * FUNCTION: acpi_get_current_resources |
@@ -141,7 +141,6 @@ acpi_get_irq_routing_table(acpi_handle device_handle, | |||
141 | * the object indicated by the passed device_handle. | 141 | * the object indicated by the passed device_handle. |
142 | * | 142 | * |
143 | ******************************************************************************/ | 143 | ******************************************************************************/ |
144 | |||
145 | acpi_status | 144 | acpi_status |
146 | acpi_get_current_resources(acpi_handle device_handle, | 145 | acpi_get_current_resources(acpi_handle device_handle, |
147 | struct acpi_buffer *ret_buffer) | 146 | struct acpi_buffer *ret_buffer) |
@@ -169,8 +168,9 @@ acpi_get_current_resources(acpi_handle device_handle, | |||
169 | return_ACPI_STATUS(status); | 168 | return_ACPI_STATUS(status); |
170 | } | 169 | } |
171 | 170 | ||
172 | EXPORT_SYMBOL(acpi_get_current_resources); | 171 | ACPI_EXPORT_SYMBOL(acpi_get_current_resources) |
173 | 172 | ||
173 | #ifdef ACPI_FUTURE_USAGE | ||
174 | /******************************************************************************* | 174 | /******************************************************************************* |
175 | * | 175 | * |
176 | * FUNCTION: acpi_get_possible_resources | 176 | * FUNCTION: acpi_get_possible_resources |
@@ -191,8 +191,6 @@ EXPORT_SYMBOL(acpi_get_current_resources); | |||
191 | * and the value of ret_buffer is undefined. | 191 | * and the value of ret_buffer is undefined. |
192 | * | 192 | * |
193 | ******************************************************************************/ | 193 | ******************************************************************************/ |
194 | |||
195 | #ifdef ACPI_FUTURE_USAGE | ||
196 | acpi_status | 194 | acpi_status |
197 | acpi_get_possible_resources(acpi_handle device_handle, | 195 | acpi_get_possible_resources(acpi_handle device_handle, |
198 | struct acpi_buffer *ret_buffer) | 196 | struct acpi_buffer *ret_buffer) |
@@ -220,7 +218,7 @@ acpi_get_possible_resources(acpi_handle device_handle, | |||
220 | return_ACPI_STATUS(status); | 218 | return_ACPI_STATUS(status); |
221 | } | 219 | } |
222 | 220 | ||
223 | EXPORT_SYMBOL(acpi_get_possible_resources); | 221 | ACPI_EXPORT_SYMBOL(acpi_get_possible_resources) |
224 | #endif /* ACPI_FUTURE_USAGE */ | 222 | #endif /* ACPI_FUTURE_USAGE */ |
225 | 223 | ||
226 | /******************************************************************************* | 224 | /******************************************************************************* |
@@ -241,7 +239,6 @@ EXPORT_SYMBOL(acpi_get_possible_resources); | |||
241 | * each resource in the list. | 239 | * each resource in the list. |
242 | * | 240 | * |
243 | ******************************************************************************/ | 241 | ******************************************************************************/ |
244 | |||
245 | acpi_status | 242 | acpi_status |
246 | acpi_walk_resources(acpi_handle device_handle, | 243 | acpi_walk_resources(acpi_handle device_handle, |
247 | char *name, | 244 | char *name, |
@@ -313,11 +310,11 @@ acpi_walk_resources(acpi_handle device_handle, | |||
313 | resource->length); | 310 | resource->length); |
314 | } | 311 | } |
315 | 312 | ||
316 | ACPI_MEM_FREE(buffer.pointer); | 313 | ACPI_FREE(buffer.pointer); |
317 | return_ACPI_STATUS(status); | 314 | return_ACPI_STATUS(status); |
318 | } | 315 | } |
319 | 316 | ||
320 | EXPORT_SYMBOL(acpi_walk_resources); | 317 | ACPI_EXPORT_SYMBOL(acpi_walk_resources) |
321 | 318 | ||
322 | /******************************************************************************* | 319 | /******************************************************************************* |
323 | * | 320 | * |
@@ -336,7 +333,6 @@ EXPORT_SYMBOL(acpi_walk_resources); | |||
336 | * the buffer pointed to by the in_buffer variable. | 333 | * the buffer pointed to by the in_buffer variable. |
337 | * | 334 | * |
338 | ******************************************************************************/ | 335 | ******************************************************************************/ |
339 | |||
340 | acpi_status | 336 | acpi_status |
341 | acpi_set_current_resources(acpi_handle device_handle, | 337 | acpi_set_current_resources(acpi_handle device_handle, |
342 | struct acpi_buffer *in_buffer) | 338 | struct acpi_buffer *in_buffer) |
@@ -356,7 +352,7 @@ acpi_set_current_resources(acpi_handle device_handle, | |||
356 | return_ACPI_STATUS(status); | 352 | return_ACPI_STATUS(status); |
357 | } | 353 | } |
358 | 354 | ||
359 | EXPORT_SYMBOL(acpi_set_current_resources); | 355 | ACPI_EXPORT_SYMBOL(acpi_set_current_resources) |
360 | 356 | ||
361 | /****************************************************************************** | 357 | /****************************************************************************** |
362 | * | 358 | * |
@@ -375,7 +371,6 @@ EXPORT_SYMBOL(acpi_set_current_resources); | |||
375 | * addresses. | 371 | * addresses. |
376 | * | 372 | * |
377 | ******************************************************************************/ | 373 | ******************************************************************************/ |
378 | |||
379 | acpi_status | 374 | acpi_status |
380 | acpi_resource_to_address64(struct acpi_resource *resource, | 375 | acpi_resource_to_address64(struct acpi_resource *resource, |
381 | struct acpi_resource_address64 *out) | 376 | struct acpi_resource_address64 *out) |
@@ -417,7 +412,7 @@ acpi_resource_to_address64(struct acpi_resource *resource, | |||
417 | return (AE_OK); | 412 | return (AE_OK); |
418 | } | 413 | } |
419 | 414 | ||
420 | EXPORT_SYMBOL(acpi_resource_to_address64); | 415 | ACPI_EXPORT_SYMBOL(acpi_resource_to_address64) |
421 | 416 | ||
422 | /******************************************************************************* | 417 | /******************************************************************************* |
423 | * | 418 | * |
@@ -437,7 +432,6 @@ EXPORT_SYMBOL(acpi_resource_to_address64); | |||
437 | * UUID subtype. Returns a struct acpi_resource of type Vendor. | 432 | * UUID subtype. Returns a struct acpi_resource of type Vendor. |
438 | * | 433 | * |
439 | ******************************************************************************/ | 434 | ******************************************************************************/ |
440 | |||
441 | acpi_status | 435 | acpi_status |
442 | acpi_get_vendor_resource(acpi_handle device_handle, | 436 | acpi_get_vendor_resource(acpi_handle device_handle, |
443 | char *name, | 437 | char *name, |
@@ -469,6 +463,8 @@ acpi_get_vendor_resource(acpi_handle device_handle, | |||
469 | return (info.status); | 463 | return (info.status); |
470 | } | 464 | } |
471 | 465 | ||
466 | ACPI_EXPORT_SYMBOL(acpi_get_vendor_resource) | ||
467 | |||
472 | /******************************************************************************* | 468 | /******************************************************************************* |
473 | * | 469 | * |
474 | * FUNCTION: acpi_rs_match_vendor_resource | 470 | * FUNCTION: acpi_rs_match_vendor_resource |
@@ -480,7 +476,6 @@ acpi_get_vendor_resource(acpi_handle device_handle, | |||
480 | * DESCRIPTION: Match a vendor resource via the ACPI 3.0 UUID | 476 | * DESCRIPTION: Match a vendor resource via the ACPI 3.0 UUID |
481 | * | 477 | * |
482 | ******************************************************************************/ | 478 | ******************************************************************************/ |
483 | |||
484 | static acpi_status | 479 | static acpi_status |
485 | acpi_rs_match_vendor_resource(struct acpi_resource *resource, void *context) | 480 | acpi_rs_match_vendor_resource(struct acpi_resource *resource, void *context) |
486 | { | 481 | { |
@@ -528,3 +523,5 @@ acpi_rs_match_vendor_resource(struct acpi_resource *resource, void *context) | |||
528 | info->status = AE_OK; | 523 | info->status = AE_OK; |
529 | return (AE_CTRL_TERMINATE); | 524 | return (AE_CTRL_TERMINATE); |
530 | } | 525 | } |
526 | |||
527 | ACPI_EXPORT_SYMBOL(acpi_rs_match_vendor_resource) | ||
diff --git a/drivers/acpi/tables/tbconvrt.c b/drivers/acpi/tables/tbconvrt.c index 254ebdbb7bef..5155b27cf032 100644 --- a/drivers/acpi/tables/tbconvrt.c +++ b/drivers/acpi/tables/tbconvrt.c | |||
@@ -41,8 +41,6 @@ | |||
41 | * POSSIBILITY OF SUCH DAMAGES. | 41 | * POSSIBILITY OF SUCH DAMAGES. |
42 | */ | 42 | */ |
43 | 43 | ||
44 | #include <linux/module.h> | ||
45 | |||
46 | #include <acpi/acpi.h> | 44 | #include <acpi/acpi.h> |
47 | #include <acpi/actables.h> | 45 | #include <acpi/actables.h> |
48 | 46 | ||
@@ -64,7 +62,7 @@ acpi_tb_convert_fadt2(struct fadt_descriptor_rev2 *local_fadt, | |||
64 | struct fadt_descriptor_rev2 *original_fadt); | 62 | struct fadt_descriptor_rev2 *original_fadt); |
65 | 63 | ||
66 | u8 acpi_fadt_is_v1; | 64 | u8 acpi_fadt_is_v1; |
67 | EXPORT_SYMBOL(acpi_fadt_is_v1); | 65 | ACPI_EXPORT_SYMBOL(acpi_fadt_is_v1) |
68 | 66 | ||
69 | /******************************************************************************* | 67 | /******************************************************************************* |
70 | * | 68 | * |
@@ -133,7 +131,7 @@ acpi_status acpi_tb_convert_to_xsdt(struct acpi_table_desc *table_info) | |||
133 | 131 | ||
134 | /* Allocate an XSDT */ | 132 | /* Allocate an XSDT */ |
135 | 133 | ||
136 | new_table = ACPI_MEM_CALLOCATE(table_size); | 134 | new_table = ACPI_ALLOCATE_ZEROED(table_size); |
137 | if (!new_table) { | 135 | if (!new_table) { |
138 | return (AE_NO_MEMORY); | 136 | return (AE_NO_MEMORY); |
139 | } | 137 | } |
@@ -509,7 +507,7 @@ acpi_status acpi_tb_convert_table_fadt(void) | |||
509 | 507 | ||
510 | /* Allocate buffer for the ACPI 2.0(+) FADT */ | 508 | /* Allocate buffer for the ACPI 2.0(+) FADT */ |
511 | 509 | ||
512 | local_fadt = ACPI_MEM_CALLOCATE(sizeof(struct fadt_descriptor_rev2)); | 510 | local_fadt = ACPI_ALLOCATE_ZEROED(sizeof(struct fadt_descriptor_rev2)); |
513 | if (!local_fadt) { | 511 | if (!local_fadt) { |
514 | return_ACPI_STATUS(AE_NO_MEMORY); | 512 | return_ACPI_STATUS(AE_NO_MEMORY); |
515 | } | 513 | } |
diff --git a/drivers/acpi/tables/tbget.c b/drivers/acpi/tables/tbget.c index 4615e1afe8de..b7bd20b9a75e 100644 --- a/drivers/acpi/tables/tbget.c +++ b/drivers/acpi/tables/tbget.c | |||
@@ -330,7 +330,7 @@ acpi_tb_get_this_table(struct acpi_pointer *address, | |||
330 | 330 | ||
331 | /* Pointer matches processor mode, copy the table to a new buffer */ | 331 | /* Pointer matches processor mode, copy the table to a new buffer */ |
332 | 332 | ||
333 | full_table = ACPI_MEM_ALLOCATE(header->length); | 333 | full_table = ACPI_ALLOCATE(header->length); |
334 | if (!full_table) { | 334 | if (!full_table) { |
335 | ACPI_ERROR((AE_INFO, | 335 | ACPI_ERROR((AE_INFO, |
336 | "Could not allocate table memory for [%4.4s] length %X", | 336 | "Could not allocate table memory for [%4.4s] length %X", |
diff --git a/drivers/acpi/tables/tbinstal.c b/drivers/acpi/tables/tbinstal.c index ec2cb978b7c4..ce57a195577a 100644 --- a/drivers/acpi/tables/tbinstal.c +++ b/drivers/acpi/tables/tbinstal.c | |||
@@ -248,7 +248,7 @@ acpi_tb_init_table_descriptor(acpi_table_type table_type, | |||
248 | 248 | ||
249 | /* Allocate a descriptor for this table */ | 249 | /* Allocate a descriptor for this table */ |
250 | 250 | ||
251 | table_desc = ACPI_MEM_CALLOCATE(sizeof(struct acpi_table_desc)); | 251 | table_desc = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_table_desc)); |
252 | if (!table_desc) { | 252 | if (!table_desc) { |
253 | return_ACPI_STATUS(AE_NO_MEMORY); | 253 | return_ACPI_STATUS(AE_NO_MEMORY); |
254 | } | 254 | } |
@@ -275,7 +275,7 @@ acpi_tb_init_table_descriptor(acpi_table_type table_type, | |||
275 | * at this location, so return an error. | 275 | * at this location, so return an error. |
276 | */ | 276 | */ |
277 | if (list_head->next) { | 277 | if (list_head->next) { |
278 | ACPI_MEM_FREE(table_desc); | 278 | ACPI_FREE(table_desc); |
279 | return_ACPI_STATUS(AE_ALREADY_EXISTS); | 279 | return_ACPI_STATUS(AE_ALREADY_EXISTS); |
280 | } | 280 | } |
281 | 281 | ||
@@ -472,7 +472,7 @@ void acpi_tb_delete_single_table(struct acpi_table_desc *table_desc) | |||
472 | 472 | ||
473 | case ACPI_MEM_ALLOCATED: | 473 | case ACPI_MEM_ALLOCATED: |
474 | 474 | ||
475 | ACPI_MEM_FREE(table_desc->pointer); | 475 | ACPI_FREE(table_desc->pointer); |
476 | break; | 476 | break; |
477 | 477 | ||
478 | case ACPI_MEM_MAPPED: | 478 | case ACPI_MEM_MAPPED: |
@@ -531,7 +531,7 @@ struct acpi_table_desc *acpi_tb_uninstall_table(struct acpi_table_desc | |||
531 | /* Free the table descriptor */ | 531 | /* Free the table descriptor */ |
532 | 532 | ||
533 | next_desc = table_desc->next; | 533 | next_desc = table_desc->next; |
534 | ACPI_MEM_FREE(table_desc); | 534 | ACPI_FREE(table_desc); |
535 | 535 | ||
536 | /* Return pointer to the next descriptor */ | 536 | /* Return pointer to the next descriptor */ |
537 | 537 | ||
diff --git a/drivers/acpi/tables/tbxface.c b/drivers/acpi/tables/tbxface.c index 3e902cdb83e1..53c627e401bf 100644 --- a/drivers/acpi/tables/tbxface.c +++ b/drivers/acpi/tables/tbxface.c | |||
@@ -42,8 +42,6 @@ | |||
42 | * POSSIBILITY OF SUCH DAMAGES. | 42 | * POSSIBILITY OF SUCH DAMAGES. |
43 | */ | 43 | */ |
44 | 44 | ||
45 | #include <linux/module.h> | ||
46 | |||
47 | #include <acpi/acpi.h> | 45 | #include <acpi/acpi.h> |
48 | #include <acpi/acnamesp.h> | 46 | #include <acpi/acnamesp.h> |
49 | #include <acpi/actables.h> | 47 | #include <acpi/actables.h> |
@@ -123,6 +121,8 @@ acpi_status acpi_load_tables(void) | |||
123 | return_ACPI_STATUS(status); | 121 | return_ACPI_STATUS(status); |
124 | } | 122 | } |
125 | 123 | ||
124 | ACPI_EXPORT_SYMBOL(acpi_load_tables) | ||
125 | |||
126 | #ifdef ACPI_FUTURE_USAGE | 126 | #ifdef ACPI_FUTURE_USAGE |
127 | /******************************************************************************* | 127 | /******************************************************************************* |
128 | * | 128 | * |
@@ -139,7 +139,6 @@ acpi_status acpi_load_tables(void) | |||
139 | * is determined that the table is invalid, the call will fail. | 139 | * is determined that the table is invalid, the call will fail. |
140 | * | 140 | * |
141 | ******************************************************************************/ | 141 | ******************************************************************************/ |
142 | |||
143 | acpi_status acpi_load_table(struct acpi_table_header *table_ptr) | 142 | acpi_status acpi_load_table(struct acpi_table_header *table_ptr) |
144 | { | 143 | { |
145 | acpi_status status; | 144 | acpi_status status; |
@@ -218,6 +217,8 @@ acpi_status acpi_load_table(struct acpi_table_header *table_ptr) | |||
218 | return_ACPI_STATUS(status); | 217 | return_ACPI_STATUS(status); |
219 | } | 218 | } |
220 | 219 | ||
220 | ACPI_EXPORT_SYMBOL(acpi_load_table) | ||
221 | |||
221 | /******************************************************************************* | 222 | /******************************************************************************* |
222 | * | 223 | * |
223 | * FUNCTION: acpi_unload_table | 224 | * FUNCTION: acpi_unload_table |
@@ -229,7 +230,6 @@ acpi_status acpi_load_table(struct acpi_table_header *table_ptr) | |||
229 | * DESCRIPTION: This routine is used to force the unload of a table | 230 | * DESCRIPTION: This routine is used to force the unload of a table |
230 | * | 231 | * |
231 | ******************************************************************************/ | 232 | ******************************************************************************/ |
232 | |||
233 | acpi_status acpi_unload_table(acpi_table_type table_type) | 233 | acpi_status acpi_unload_table(acpi_table_type table_type) |
234 | { | 234 | { |
235 | struct acpi_table_desc *table_desc; | 235 | struct acpi_table_desc *table_desc; |
@@ -263,6 +263,8 @@ acpi_status acpi_unload_table(acpi_table_type table_type) | |||
263 | return_ACPI_STATUS(AE_OK); | 263 | return_ACPI_STATUS(AE_OK); |
264 | } | 264 | } |
265 | 265 | ||
266 | ACPI_EXPORT_SYMBOL(acpi_unload_table) | ||
267 | |||
266 | /******************************************************************************* | 268 | /******************************************************************************* |
267 | * | 269 | * |
268 | * FUNCTION: acpi_get_table_header | 270 | * FUNCTION: acpi_get_table_header |
@@ -283,7 +285,6 @@ acpi_status acpi_unload_table(acpi_table_type table_type) | |||
283 | * have a standard header and is fixed length. | 285 | * have a standard header and is fixed length. |
284 | * | 286 | * |
285 | ******************************************************************************/ | 287 | ******************************************************************************/ |
286 | |||
287 | acpi_status | 288 | acpi_status |
288 | acpi_get_table_header(acpi_table_type table_type, | 289 | acpi_get_table_header(acpi_table_type table_type, |
289 | u32 instance, struct acpi_table_header *out_table_header) | 290 | u32 instance, struct acpi_table_header *out_table_header) |
@@ -327,6 +328,7 @@ acpi_get_table_header(acpi_table_type table_type, | |||
327 | return_ACPI_STATUS(status); | 328 | return_ACPI_STATUS(status); |
328 | } | 329 | } |
329 | 330 | ||
331 | ACPI_EXPORT_SYMBOL(acpi_get_table_header) | ||
330 | #endif /* ACPI_FUTURE_USAGE */ | 332 | #endif /* ACPI_FUTURE_USAGE */ |
331 | 333 | ||
332 | /******************************************************************************* | 334 | /******************************************************************************* |
@@ -351,7 +353,6 @@ acpi_get_table_header(acpi_table_type table_type, | |||
351 | * a complete table including the header. | 353 | * a complete table including the header. |
352 | * | 354 | * |
353 | ******************************************************************************/ | 355 | ******************************************************************************/ |
354 | |||
355 | acpi_status | 356 | acpi_status |
356 | acpi_get_table(acpi_table_type table_type, | 357 | acpi_get_table(acpi_table_type table_type, |
357 | u32 instance, struct acpi_buffer *ret_buffer) | 358 | u32 instance, struct acpi_buffer *ret_buffer) |
@@ -420,4 +421,4 @@ acpi_get_table(acpi_table_type table_type, | |||
420 | return_ACPI_STATUS(AE_OK); | 421 | return_ACPI_STATUS(AE_OK); |
421 | } | 422 | } |
422 | 423 | ||
423 | EXPORT_SYMBOL(acpi_get_table); | 424 | ACPI_EXPORT_SYMBOL(acpi_get_table) |
diff --git a/drivers/acpi/tables/tbxfroot.c b/drivers/acpi/tables/tbxfroot.c index 7f68b759f15a..1b6d8c510e95 100644 --- a/drivers/acpi/tables/tbxfroot.c +++ b/drivers/acpi/tables/tbxfroot.c | |||
@@ -41,8 +41,6 @@ | |||
41 | * POSSIBILITY OF SUCH DAMAGES. | 41 | * POSSIBILITY OF SUCH DAMAGES. |
42 | */ | 42 | */ |
43 | 43 | ||
44 | #include <linux/module.h> | ||
45 | |||
46 | #include <acpi/acpi.h> | 44 | #include <acpi/acpi.h> |
47 | #include <acpi/actables.h> | 45 | #include <acpi/actables.h> |
48 | 46 | ||
@@ -263,7 +261,7 @@ acpi_get_firmware_table(acpi_string signature, | |||
263 | 261 | ||
264 | /* Get and validate the RSDT */ | 262 | /* Get and validate the RSDT */ |
265 | 263 | ||
266 | rsdt_info = ACPI_MEM_CALLOCATE(sizeof(struct acpi_table_desc)); | 264 | rsdt_info = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_table_desc)); |
267 | if (!rsdt_info) { | 265 | if (!rsdt_info) { |
268 | return_ACPI_STATUS(AE_NO_MEMORY); | 266 | return_ACPI_STATUS(AE_NO_MEMORY); |
269 | } | 267 | } |
@@ -280,13 +278,13 @@ acpi_get_firmware_table(acpi_string signature, | |||
280 | 278 | ||
281 | /* Allocate a scratch table header and table descriptor */ | 279 | /* Allocate a scratch table header and table descriptor */ |
282 | 280 | ||
283 | header = ACPI_MEM_ALLOCATE(sizeof(struct acpi_table_header)); | 281 | header = ACPI_ALLOCATE(sizeof(struct acpi_table_header)); |
284 | if (!header) { | 282 | if (!header) { |
285 | status = AE_NO_MEMORY; | 283 | status = AE_NO_MEMORY; |
286 | goto cleanup; | 284 | goto cleanup; |
287 | } | 285 | } |
288 | 286 | ||
289 | table_info = ACPI_MEM_ALLOCATE(sizeof(struct acpi_table_desc)); | 287 | table_info = ACPI_ALLOCATE(sizeof(struct acpi_table_desc)); |
290 | if (!table_info) { | 288 | if (!table_info) { |
291 | status = AE_NO_MEMORY; | 289 | status = AE_NO_MEMORY; |
292 | goto cleanup; | 290 | goto cleanup; |
@@ -359,23 +357,21 @@ acpi_get_firmware_table(acpi_string signature, | |||
359 | acpi_os_unmap_memory(rsdt_info->pointer, | 357 | acpi_os_unmap_memory(rsdt_info->pointer, |
360 | (acpi_size) rsdt_info->pointer->length); | 358 | (acpi_size) rsdt_info->pointer->length); |
361 | } | 359 | } |
362 | ACPI_MEM_FREE(rsdt_info); | 360 | ACPI_FREE(rsdt_info); |
363 | 361 | ||
364 | if (header) { | 362 | if (header) { |
365 | ACPI_MEM_FREE(header); | 363 | ACPI_FREE(header); |
366 | } | 364 | } |
367 | if (table_info) { | 365 | if (table_info) { |
368 | ACPI_MEM_FREE(table_info); | 366 | ACPI_FREE(table_info); |
369 | } | 367 | } |
370 | return_ACPI_STATUS(status); | 368 | return_ACPI_STATUS(status); |
371 | } | 369 | } |
372 | 370 | ||
373 | EXPORT_SYMBOL(acpi_get_firmware_table); | 371 | ACPI_EXPORT_SYMBOL(acpi_get_firmware_table) |
374 | 372 | ||
375 | /* TBD: Move to a new file */ | 373 | /* TBD: Move to a new file */ |
376 | |||
377 | #if ACPI_MACHINE_WIDTH != 16 | 374 | #if ACPI_MACHINE_WIDTH != 16 |
378 | |||
379 | /******************************************************************************* | 375 | /******************************************************************************* |
380 | * | 376 | * |
381 | * FUNCTION: acpi_find_root_pointer | 377 | * FUNCTION: acpi_find_root_pointer |
@@ -388,7 +384,6 @@ EXPORT_SYMBOL(acpi_get_firmware_table); | |||
388 | * DESCRIPTION: Find the RSDP | 384 | * DESCRIPTION: Find the RSDP |
389 | * | 385 | * |
390 | ******************************************************************************/ | 386 | ******************************************************************************/ |
391 | |||
392 | acpi_status acpi_find_root_pointer(u32 flags, struct acpi_pointer *rsdp_address) | 387 | acpi_status acpi_find_root_pointer(u32 flags, struct acpi_pointer *rsdp_address) |
393 | { | 388 | { |
394 | struct acpi_table_desc table_info; | 389 | struct acpi_table_desc table_info; |
@@ -411,6 +406,8 @@ acpi_status acpi_find_root_pointer(u32 flags, struct acpi_pointer *rsdp_address) | |||
411 | return_ACPI_STATUS(AE_OK); | 406 | return_ACPI_STATUS(AE_OK); |
412 | } | 407 | } |
413 | 408 | ||
409 | ACPI_EXPORT_SYMBOL(acpi_find_root_pointer) | ||
410 | |||
414 | /******************************************************************************* | 411 | /******************************************************************************* |
415 | * | 412 | * |
416 | * FUNCTION: acpi_tb_scan_memory_for_rsdp | 413 | * FUNCTION: acpi_tb_scan_memory_for_rsdp |
@@ -423,7 +420,6 @@ acpi_status acpi_find_root_pointer(u32 flags, struct acpi_pointer *rsdp_address) | |||
423 | * DESCRIPTION: Search a block of memory for the RSDP signature | 420 | * DESCRIPTION: Search a block of memory for the RSDP signature |
424 | * | 421 | * |
425 | ******************************************************************************/ | 422 | ******************************************************************************/ |
426 | |||
427 | static u8 *acpi_tb_scan_memory_for_rsdp(u8 * start_address, u32 length) | 423 | static u8 *acpi_tb_scan_memory_for_rsdp(u8 * start_address, u32 length) |
428 | { | 424 | { |
429 | acpi_status status; | 425 | acpi_status status; |
diff --git a/drivers/acpi/utilities/utalloc.c b/drivers/acpi/utilities/utalloc.c index 34de3791d4c2..7b35eb84d058 100644 --- a/drivers/acpi/utilities/utalloc.c +++ b/drivers/acpi/utilities/utalloc.c | |||
@@ -252,7 +252,7 @@ acpi_ut_initialize_buffer(struct acpi_buffer * buffer, | |||
252 | 252 | ||
253 | /* Allocate a new buffer with local interface to allow tracking */ | 253 | /* Allocate a new buffer with local interface to allow tracking */ |
254 | 254 | ||
255 | buffer->pointer = ACPI_MEM_CALLOCATE(required_length); | 255 | buffer->pointer = ACPI_ALLOCATE_ZEROED(required_length); |
256 | if (!buffer->pointer) { | 256 | if (!buffer->pointer) { |
257 | return (AE_NO_MEMORY); | 257 | return (AE_NO_MEMORY); |
258 | } | 258 | } |
diff --git a/drivers/acpi/utilities/utcache.c b/drivers/acpi/utilities/utcache.c index 044c890e5b3c..5d2f4b2802a5 100644 --- a/drivers/acpi/utilities/utcache.c +++ b/drivers/acpi/utilities/utcache.c | |||
@@ -125,7 +125,7 @@ acpi_status acpi_os_purge_cache(struct acpi_memory_list * cache) | |||
125 | &(((char *)cache-> | 125 | &(((char *)cache-> |
126 | list_head)[cache-> | 126 | list_head)[cache-> |
127 | link_offset]))); | 127 | link_offset]))); |
128 | ACPI_MEM_FREE(cache->list_head); | 128 | ACPI_FREE(cache->list_head); |
129 | 129 | ||
130 | cache->list_head = next; | 130 | cache->list_head = next; |
131 | cache->current_depth--; | 131 | cache->current_depth--; |
@@ -194,7 +194,7 @@ acpi_os_release_object(struct acpi_memory_list * cache, void *object) | |||
194 | /* If cache is full, just free this object */ | 194 | /* If cache is full, just free this object */ |
195 | 195 | ||
196 | if (cache->current_depth >= cache->max_depth) { | 196 | if (cache->current_depth >= cache->max_depth) { |
197 | ACPI_MEM_FREE(object); | 197 | ACPI_FREE(object); |
198 | ACPI_MEM_TRACKING(cache->total_freed++); | 198 | ACPI_MEM_TRACKING(cache->total_freed++); |
199 | } | 199 | } |
200 | 200 | ||
@@ -289,14 +289,14 @@ void *acpi_os_acquire_object(struct acpi_memory_list *cache) | |||
289 | 289 | ||
290 | ACPI_MEM_TRACKING(cache->total_allocated++); | 290 | ACPI_MEM_TRACKING(cache->total_allocated++); |
291 | 291 | ||
292 | /* Avoid deadlock with ACPI_MEM_CALLOCATE */ | 292 | /* Avoid deadlock with ACPI_ALLOCATE_ZEROED */ |
293 | 293 | ||
294 | status = acpi_ut_release_mutex(ACPI_MTX_CACHES); | 294 | status = acpi_ut_release_mutex(ACPI_MTX_CACHES); |
295 | if (ACPI_FAILURE(status)) { | 295 | if (ACPI_FAILURE(status)) { |
296 | return (NULL); | 296 | return (NULL); |
297 | } | 297 | } |
298 | 298 | ||
299 | object = ACPI_MEM_CALLOCATE(cache->object_size); | 299 | object = ACPI_ALLOCATE_ZEROED(cache->object_size); |
300 | if (!object) { | 300 | if (!object) { |
301 | return (NULL); | 301 | return (NULL); |
302 | } | 302 | } |
diff --git a/drivers/acpi/utilities/utcopy.c b/drivers/acpi/utilities/utcopy.c index 47875935c3f4..371cddc0d574 100644 --- a/drivers/acpi/utilities/utcopy.c +++ b/drivers/acpi/utilities/utcopy.c | |||
@@ -472,8 +472,8 @@ acpi_ut_copy_esimple_to_isimple(union acpi_object *external_object, | |||
472 | case ACPI_TYPE_STRING: | 472 | case ACPI_TYPE_STRING: |
473 | 473 | ||
474 | internal_object->string.pointer = | 474 | internal_object->string.pointer = |
475 | ACPI_MEM_CALLOCATE((acpi_size) external_object->string. | 475 | ACPI_ALLOCATE_ZEROED((acpi_size) external_object->string. |
476 | length + 1); | 476 | length + 1); |
477 | if (!internal_object->string.pointer) { | 477 | if (!internal_object->string.pointer) { |
478 | goto error_exit; | 478 | goto error_exit; |
479 | } | 479 | } |
@@ -488,7 +488,7 @@ acpi_ut_copy_esimple_to_isimple(union acpi_object *external_object, | |||
488 | case ACPI_TYPE_BUFFER: | 488 | case ACPI_TYPE_BUFFER: |
489 | 489 | ||
490 | internal_object->buffer.pointer = | 490 | internal_object->buffer.pointer = |
491 | ACPI_MEM_CALLOCATE(external_object->buffer.length); | 491 | ACPI_ALLOCATE_ZEROED(external_object->buffer.length); |
492 | if (!internal_object->buffer.pointer) { | 492 | if (!internal_object->buffer.pointer) { |
493 | goto error_exit; | 493 | goto error_exit; |
494 | } | 494 | } |
@@ -676,7 +676,7 @@ acpi_ut_copy_simple_object(union acpi_operand_object *source_desc, | |||
676 | if ((source_desc->buffer.pointer) && | 676 | if ((source_desc->buffer.pointer) && |
677 | (source_desc->buffer.length)) { | 677 | (source_desc->buffer.length)) { |
678 | dest_desc->buffer.pointer = | 678 | dest_desc->buffer.pointer = |
679 | ACPI_MEM_ALLOCATE(source_desc->buffer.length); | 679 | ACPI_ALLOCATE(source_desc->buffer.length); |
680 | if (!dest_desc->buffer.pointer) { | 680 | if (!dest_desc->buffer.pointer) { |
681 | return (AE_NO_MEMORY); | 681 | return (AE_NO_MEMORY); |
682 | } | 682 | } |
@@ -697,8 +697,8 @@ acpi_ut_copy_simple_object(union acpi_operand_object *source_desc, | |||
697 | */ | 697 | */ |
698 | if (source_desc->string.pointer) { | 698 | if (source_desc->string.pointer) { |
699 | dest_desc->string.pointer = | 699 | dest_desc->string.pointer = |
700 | ACPI_MEM_ALLOCATE((acpi_size) source_desc->string. | 700 | ACPI_ALLOCATE((acpi_size) source_desc->string. |
701 | length + 1); | 701 | length + 1); |
702 | if (!dest_desc->string.pointer) { | 702 | if (!dest_desc->string.pointer) { |
703 | return (AE_NO_MEMORY); | 703 | return (AE_NO_MEMORY); |
704 | } | 704 | } |
@@ -805,9 +805,7 @@ acpi_ut_copy_ielement_to_ielement(u8 object_type, | |||
805 | /* | 805 | /* |
806 | * Create the object array | 806 | * Create the object array |
807 | */ | 807 | */ |
808 | target_object->package.elements = | 808 | target_object->package.elements = ACPI_ALLOCATE_ZEROED(((acpi_size) source_object->package.count + 1) * sizeof(void *)); |
809 | ACPI_MEM_CALLOCATE(((acpi_size) source_object->package. | ||
810 | count + 1) * sizeof(void *)); | ||
811 | if (!target_object->package.elements) { | 809 | if (!target_object->package.elements) { |
812 | status = AE_NO_MEMORY; | 810 | status = AE_NO_MEMORY; |
813 | goto error_exit; | 811 | goto error_exit; |
@@ -865,10 +863,10 @@ acpi_ut_copy_ipackage_to_ipackage(union acpi_operand_object *source_obj, | |||
865 | /* | 863 | /* |
866 | * Create the object array and walk the source package tree | 864 | * Create the object array and walk the source package tree |
867 | */ | 865 | */ |
868 | dest_obj->package.elements = ACPI_MEM_CALLOCATE(((acpi_size) | 866 | dest_obj->package.elements = ACPI_ALLOCATE_ZEROED(((acpi_size) |
869 | source_obj->package. | 867 | source_obj->package. |
870 | count + | 868 | count + |
871 | 1) * sizeof(void *)); | 869 | 1) * sizeof(void *)); |
872 | if (!dest_obj->package.elements) { | 870 | if (!dest_obj->package.elements) { |
873 | ACPI_ERROR((AE_INFO, "Package allocation failure")); | 871 | ACPI_ERROR((AE_INFO, "Package allocation failure")); |
874 | return_ACPI_STATUS(AE_NO_MEMORY); | 872 | return_ACPI_STATUS(AE_NO_MEMORY); |
diff --git a/drivers/acpi/utilities/utdebug.c b/drivers/acpi/utilities/utdebug.c index 6e92b2a3c0fd..a8c350643d57 100644 --- a/drivers/acpi/utilities/utdebug.c +++ b/drivers/acpi/utilities/utdebug.c | |||
@@ -41,8 +41,6 @@ | |||
41 | * POSSIBILITY OF SUCH DAMAGES. | 41 | * POSSIBILITY OF SUCH DAMAGES. |
42 | */ | 42 | */ |
43 | 43 | ||
44 | #include <linux/module.h> | ||
45 | |||
46 | #include <acpi/acpi.h> | 44 | #include <acpi/acpi.h> |
47 | 45 | ||
48 | #define _COMPONENT ACPI_UTILITIES | 46 | #define _COMPONENT ACPI_UTILITIES |
@@ -164,7 +162,7 @@ acpi_ut_debug_print(u32 requested_debug_level, | |||
164 | const char *function_name, | 162 | const char *function_name, |
165 | char *module_name, u32 component_id, char *format, ...) | 163 | char *module_name, u32 component_id, char *format, ...) |
166 | { | 164 | { |
167 | u32 thread_id; | 165 | acpi_thread_id thread_id; |
168 | va_list args; | 166 | va_list args; |
169 | 167 | ||
170 | /* | 168 | /* |
@@ -179,7 +177,6 @@ acpi_ut_debug_print(u32 requested_debug_level, | |||
179 | * Thread tracking and context switch notification | 177 | * Thread tracking and context switch notification |
180 | */ | 178 | */ |
181 | thread_id = acpi_os_get_thread_id(); | 179 | thread_id = acpi_os_get_thread_id(); |
182 | |||
183 | if (thread_id != acpi_gbl_prev_thread_id) { | 180 | if (thread_id != acpi_gbl_prev_thread_id) { |
184 | if (ACPI_LV_THREADS & acpi_dbg_level) { | 181 | if (ACPI_LV_THREADS & acpi_dbg_level) { |
185 | acpi_os_printf | 182 | acpi_os_printf |
@@ -208,7 +205,7 @@ acpi_ut_debug_print(u32 requested_debug_level, | |||
208 | acpi_os_vprintf(format, args); | 205 | acpi_os_vprintf(format, args); |
209 | } | 206 | } |
210 | 207 | ||
211 | EXPORT_SYMBOL(acpi_ut_debug_print); | 208 | ACPI_EXPORT_SYMBOL(acpi_ut_debug_print) |
212 | 209 | ||
213 | /******************************************************************************* | 210 | /******************************************************************************* |
214 | * | 211 | * |
@@ -228,7 +225,6 @@ EXPORT_SYMBOL(acpi_ut_debug_print); | |||
228 | * debug_print so that the same macros can be used. | 225 | * debug_print so that the same macros can be used. |
229 | * | 226 | * |
230 | ******************************************************************************/ | 227 | ******************************************************************************/ |
231 | |||
232 | void ACPI_INTERNAL_VAR_XFACE | 228 | void ACPI_INTERNAL_VAR_XFACE |
233 | acpi_ut_debug_print_raw(u32 requested_debug_level, | 229 | acpi_ut_debug_print_raw(u32 requested_debug_level, |
234 | u32 line_number, | 230 | u32 line_number, |
@@ -246,7 +242,7 @@ acpi_ut_debug_print_raw(u32 requested_debug_level, | |||
246 | acpi_os_vprintf(format, args); | 242 | acpi_os_vprintf(format, args); |
247 | } | 243 | } |
248 | 244 | ||
249 | EXPORT_SYMBOL(acpi_ut_debug_print_raw); | 245 | ACPI_EXPORT_SYMBOL(acpi_ut_debug_print_raw) |
250 | 246 | ||
251 | /******************************************************************************* | 247 | /******************************************************************************* |
252 | * | 248 | * |
@@ -263,7 +259,6 @@ EXPORT_SYMBOL(acpi_ut_debug_print_raw); | |||
263 | * set in debug_level | 259 | * set in debug_level |
264 | * | 260 | * |
265 | ******************************************************************************/ | 261 | ******************************************************************************/ |
266 | |||
267 | void | 262 | void |
268 | acpi_ut_trace(u32 line_number, | 263 | acpi_ut_trace(u32 line_number, |
269 | const char *function_name, char *module_name, u32 component_id) | 264 | const char *function_name, char *module_name, u32 component_id) |
@@ -277,7 +272,7 @@ acpi_ut_trace(u32 line_number, | |||
277 | component_id, "%s\n", acpi_gbl_fn_entry_str); | 272 | component_id, "%s\n", acpi_gbl_fn_entry_str); |
278 | } | 273 | } |
279 | 274 | ||
280 | EXPORT_SYMBOL(acpi_ut_trace); | 275 | ACPI_EXPORT_SYMBOL(acpi_ut_trace) |
281 | 276 | ||
282 | /******************************************************************************* | 277 | /******************************************************************************* |
283 | * | 278 | * |
@@ -295,7 +290,6 @@ EXPORT_SYMBOL(acpi_ut_trace); | |||
295 | * set in debug_level | 290 | * set in debug_level |
296 | * | 291 | * |
297 | ******************************************************************************/ | 292 | ******************************************************************************/ |
298 | |||
299 | void | 293 | void |
300 | acpi_ut_trace_ptr(u32 line_number, | 294 | acpi_ut_trace_ptr(u32 line_number, |
301 | const char *function_name, | 295 | const char *function_name, |
@@ -402,7 +396,7 @@ acpi_ut_exit(u32 line_number, | |||
402 | acpi_gbl_nesting_level--; | 396 | acpi_gbl_nesting_level--; |
403 | } | 397 | } |
404 | 398 | ||
405 | EXPORT_SYMBOL(acpi_ut_exit); | 399 | ACPI_EXPORT_SYMBOL(acpi_ut_exit) |
406 | 400 | ||
407 | /******************************************************************************* | 401 | /******************************************************************************* |
408 | * | 402 | * |
@@ -420,7 +414,6 @@ EXPORT_SYMBOL(acpi_ut_exit); | |||
420 | * set in debug_level. Prints exit status also. | 414 | * set in debug_level. Prints exit status also. |
421 | * | 415 | * |
422 | ******************************************************************************/ | 416 | ******************************************************************************/ |
423 | |||
424 | void | 417 | void |
425 | acpi_ut_status_exit(u32 line_number, | 418 | acpi_ut_status_exit(u32 line_number, |
426 | const char *function_name, | 419 | const char *function_name, |
@@ -444,7 +437,7 @@ acpi_ut_status_exit(u32 line_number, | |||
444 | acpi_gbl_nesting_level--; | 437 | acpi_gbl_nesting_level--; |
445 | } | 438 | } |
446 | 439 | ||
447 | EXPORT_SYMBOL(acpi_ut_status_exit); | 440 | ACPI_EXPORT_SYMBOL(acpi_ut_status_exit) |
448 | 441 | ||
449 | /******************************************************************************* | 442 | /******************************************************************************* |
450 | * | 443 | * |
@@ -462,7 +455,6 @@ EXPORT_SYMBOL(acpi_ut_status_exit); | |||
462 | * set in debug_level. Prints exit value also. | 455 | * set in debug_level. Prints exit value also. |
463 | * | 456 | * |
464 | ******************************************************************************/ | 457 | ******************************************************************************/ |
465 | |||
466 | void | 458 | void |
467 | acpi_ut_value_exit(u32 line_number, | 459 | acpi_ut_value_exit(u32 line_number, |
468 | const char *function_name, | 460 | const char *function_name, |
@@ -477,7 +469,7 @@ acpi_ut_value_exit(u32 line_number, | |||
477 | acpi_gbl_nesting_level--; | 469 | acpi_gbl_nesting_level--; |
478 | } | 470 | } |
479 | 471 | ||
480 | EXPORT_SYMBOL(acpi_ut_value_exit); | 472 | ACPI_EXPORT_SYMBOL(acpi_ut_value_exit) |
481 | 473 | ||
482 | /******************************************************************************* | 474 | /******************************************************************************* |
483 | * | 475 | * |
@@ -495,7 +487,6 @@ EXPORT_SYMBOL(acpi_ut_value_exit); | |||
495 | * set in debug_level. Prints exit value also. | 487 | * set in debug_level. Prints exit value also. |
496 | * | 488 | * |
497 | ******************************************************************************/ | 489 | ******************************************************************************/ |
498 | |||
499 | void | 490 | void |
500 | acpi_ut_ptr_exit(u32 line_number, | 491 | acpi_ut_ptr_exit(u32 line_number, |
501 | const char *function_name, | 492 | const char *function_name, |
diff --git a/drivers/acpi/utilities/utdelete.c b/drivers/acpi/utilities/utdelete.c index dbae72121cea..9c6867fcf009 100644 --- a/drivers/acpi/utilities/utdelete.c +++ b/drivers/acpi/utilities/utdelete.c | |||
@@ -236,7 +236,7 @@ static void acpi_ut_delete_internal_obj(union acpi_operand_object *object) | |||
236 | if (obj_pointer) { | 236 | if (obj_pointer) { |
237 | ACPI_DEBUG_PRINT((ACPI_DB_ALLOCATIONS, | 237 | ACPI_DEBUG_PRINT((ACPI_DB_ALLOCATIONS, |
238 | "Deleting Object Subptr %p\n", obj_pointer)); | 238 | "Deleting Object Subptr %p\n", obj_pointer)); |
239 | ACPI_MEM_FREE(obj_pointer); | 239 | ACPI_FREE(obj_pointer); |
240 | } | 240 | } |
241 | 241 | ||
242 | /* Now the object can be safely deleted */ | 242 | /* Now the object can be safely deleted */ |
@@ -275,7 +275,7 @@ void acpi_ut_delete_internal_object_list(union acpi_operand_object **obj_list) | |||
275 | 275 | ||
276 | /* Free the combined parameter pointer list and object array */ | 276 | /* Free the combined parameter pointer list and object array */ |
277 | 277 | ||
278 | ACPI_MEM_FREE(obj_list); | 278 | ACPI_FREE(obj_list); |
279 | return_VOID; | 279 | return_VOID; |
280 | } | 280 | } |
281 | 281 | ||
diff --git a/drivers/acpi/utilities/uteval.c b/drivers/acpi/utilities/uteval.c index 952ffdea93aa..68b9eff4b326 100644 --- a/drivers/acpi/utilities/uteval.c +++ b/drivers/acpi/utilities/uteval.c | |||
@@ -461,7 +461,7 @@ acpi_ut_execute_CID(struct acpi_namespace_node * device_node, | |||
461 | size = (((count - 1) * sizeof(struct acpi_compatible_id)) + | 461 | size = (((count - 1) * sizeof(struct acpi_compatible_id)) + |
462 | sizeof(struct acpi_compatible_id_list)); | 462 | sizeof(struct acpi_compatible_id_list)); |
463 | 463 | ||
464 | cid_list = ACPI_MEM_CALLOCATE((acpi_size) size); | 464 | cid_list = ACPI_ALLOCATE_ZEROED((acpi_size) size); |
465 | if (!cid_list) { | 465 | if (!cid_list) { |
466 | return_ACPI_STATUS(AE_NO_MEMORY); | 466 | return_ACPI_STATUS(AE_NO_MEMORY); |
467 | } | 467 | } |
@@ -502,7 +502,7 @@ acpi_ut_execute_CID(struct acpi_namespace_node * device_node, | |||
502 | /* Cleanup on error */ | 502 | /* Cleanup on error */ |
503 | 503 | ||
504 | if (ACPI_FAILURE(status)) { | 504 | if (ACPI_FAILURE(status)) { |
505 | ACPI_MEM_FREE(cid_list); | 505 | ACPI_FREE(cid_list); |
506 | } else { | 506 | } else { |
507 | *return_cid_list = cid_list; | 507 | *return_cid_list = cid_list; |
508 | } | 508 | } |
diff --git a/drivers/acpi/utilities/utglobal.c b/drivers/acpi/utilities/utglobal.c index 767c5e44a04b..5bc8da7acc6c 100644 --- a/drivers/acpi/utilities/utglobal.c +++ b/drivers/acpi/utilities/utglobal.c | |||
@@ -43,7 +43,6 @@ | |||
43 | 43 | ||
44 | #define DEFINE_ACPI_GLOBALS | 44 | #define DEFINE_ACPI_GLOBALS |
45 | 45 | ||
46 | #include <linux/module.h> | ||
47 | #include <acpi/acpi.h> | 46 | #include <acpi/acpi.h> |
48 | #include <acpi/acnamesp.h> | 47 | #include <acpi/acnamesp.h> |
49 | 48 | ||
@@ -144,12 +143,10 @@ const char *acpi_format_exception(acpi_status status) | |||
144 | 143 | ||
145 | /* Debug switch - level and trace mask */ | 144 | /* Debug switch - level and trace mask */ |
146 | u32 acpi_dbg_level = ACPI_DEBUG_DEFAULT; | 145 | u32 acpi_dbg_level = ACPI_DEBUG_DEFAULT; |
147 | EXPORT_SYMBOL(acpi_dbg_level); | ||
148 | 146 | ||
149 | /* Debug switch - layer (component) mask */ | 147 | /* Debug switch - layer (component) mask */ |
150 | 148 | ||
151 | u32 acpi_dbg_layer = ACPI_COMPONENT_DEFAULT | ACPI_ALL_DRIVERS; | 149 | u32 acpi_dbg_layer = ACPI_COMPONENT_DEFAULT | ACPI_ALL_DRIVERS; |
152 | EXPORT_SYMBOL(acpi_dbg_layer); | ||
153 | u32 acpi_gbl_nesting_level = 0; | 150 | u32 acpi_gbl_nesting_level = 0; |
154 | 151 | ||
155 | /* Debugger globals */ | 152 | /* Debugger globals */ |
@@ -871,3 +868,6 @@ void acpi_ut_init_globals(void) | |||
871 | 868 | ||
872 | return_VOID; | 869 | return_VOID; |
873 | } | 870 | } |
871 | |||
872 | ACPI_EXPORT_SYMBOL(acpi_dbg_level) | ||
873 | ACPI_EXPORT_SYMBOL(acpi_dbg_layer) | ||
diff --git a/drivers/acpi/utilities/utinit.c b/drivers/acpi/utilities/utinit.c index ba771b4f39bc..40313de6977d 100644 --- a/drivers/acpi/utilities/utinit.c +++ b/drivers/acpi/utilities/utinit.c | |||
@@ -186,14 +186,14 @@ static void acpi_ut_terminate(void) | |||
186 | gpe_block = gpe_xrupt_info->gpe_block_list_head; | 186 | gpe_block = gpe_xrupt_info->gpe_block_list_head; |
187 | while (gpe_block) { | 187 | while (gpe_block) { |
188 | next_gpe_block = gpe_block->next; | 188 | next_gpe_block = gpe_block->next; |
189 | ACPI_MEM_FREE(gpe_block->event_info); | 189 | ACPI_FREE(gpe_block->event_info); |
190 | ACPI_MEM_FREE(gpe_block->register_info); | 190 | ACPI_FREE(gpe_block->register_info); |
191 | ACPI_MEM_FREE(gpe_block); | 191 | ACPI_FREE(gpe_block); |
192 | 192 | ||
193 | gpe_block = next_gpe_block; | 193 | gpe_block = next_gpe_block; |
194 | } | 194 | } |
195 | next_gpe_xrupt_info = gpe_xrupt_info->next; | 195 | next_gpe_xrupt_info = gpe_xrupt_info->next; |
196 | ACPI_MEM_FREE(gpe_xrupt_info); | 196 | ACPI_FREE(gpe_xrupt_info); |
197 | gpe_xrupt_info = next_gpe_xrupt_info; | 197 | gpe_xrupt_info = next_gpe_xrupt_info; |
198 | } | 198 | } |
199 | 199 | ||
diff --git a/drivers/acpi/utilities/utmisc.c b/drivers/acpi/utilities/utmisc.c index 60f36130663c..77268ba86291 100644 --- a/drivers/acpi/utilities/utmisc.c +++ b/drivers/acpi/utilities/utmisc.c | |||
@@ -463,7 +463,7 @@ acpi_ut_display_init_pathname(u8 type, | |||
463 | } | 463 | } |
464 | acpi_os_printf("\n"); | 464 | acpi_os_printf("\n"); |
465 | 465 | ||
466 | ACPI_MEM_FREE(buffer.pointer); | 466 | ACPI_FREE(buffer.pointer); |
467 | } | 467 | } |
468 | #endif | 468 | #endif |
469 | 469 | ||
diff --git a/drivers/acpi/utilities/utmutex.c b/drivers/acpi/utilities/utmutex.c index 45a7244df924..0ac6700a45f8 100644 --- a/drivers/acpi/utilities/utmutex.c +++ b/drivers/acpi/utilities/utmutex.c | |||
@@ -192,7 +192,7 @@ static acpi_status acpi_ut_delete_mutex(acpi_mutex_handle mutex_id) | |||
192 | acpi_status acpi_ut_acquire_mutex(acpi_mutex_handle mutex_id) | 192 | acpi_status acpi_ut_acquire_mutex(acpi_mutex_handle mutex_id) |
193 | { | 193 | { |
194 | acpi_status status; | 194 | acpi_status status; |
195 | u32 this_thread_id; | 195 | acpi_thread_id this_thread_id; |
196 | 196 | ||
197 | ACPI_FUNCTION_NAME("ut_acquire_mutex"); | 197 | ACPI_FUNCTION_NAME("ut_acquire_mutex"); |
198 | 198 | ||
@@ -275,7 +275,7 @@ acpi_status acpi_ut_acquire_mutex(acpi_mutex_handle mutex_id) | |||
275 | acpi_status acpi_ut_release_mutex(acpi_mutex_handle mutex_id) | 275 | acpi_status acpi_ut_release_mutex(acpi_mutex_handle mutex_id) |
276 | { | 276 | { |
277 | acpi_status status; | 277 | acpi_status status; |
278 | u32 this_thread_id; | 278 | acpi_thread_id this_thread_id; |
279 | 279 | ||
280 | ACPI_FUNCTION_NAME("ut_release_mutex"); | 280 | ACPI_FUNCTION_NAME("ut_release_mutex"); |
281 | 281 | ||
diff --git a/drivers/acpi/utilities/utobject.c b/drivers/acpi/utilities/utobject.c index b1205a58028c..8e3dcbd23f5d 100644 --- a/drivers/acpi/utilities/utobject.c +++ b/drivers/acpi/utilities/utobject.c | |||
@@ -176,7 +176,7 @@ union acpi_operand_object *acpi_ut_create_buffer_object(acpi_size buffer_size) | |||
176 | 176 | ||
177 | /* Allocate the actual buffer */ | 177 | /* Allocate the actual buffer */ |
178 | 178 | ||
179 | buffer = ACPI_MEM_CALLOCATE(buffer_size); | 179 | buffer = ACPI_ALLOCATE_ZEROED(buffer_size); |
180 | if (!buffer) { | 180 | if (!buffer) { |
181 | ACPI_ERROR((AE_INFO, "Could not allocate size %X", | 181 | ACPI_ERROR((AE_INFO, "Could not allocate size %X", |
182 | (u32) buffer_size)); | 182 | (u32) buffer_size)); |
@@ -228,7 +228,7 @@ union acpi_operand_object *acpi_ut_create_string_object(acpi_size string_size) | |||
228 | * Allocate the actual string buffer -- (Size + 1) for NULL terminator. | 228 | * Allocate the actual string buffer -- (Size + 1) for NULL terminator. |
229 | * NOTE: Zero-length strings are NULL terminated | 229 | * NOTE: Zero-length strings are NULL terminated |
230 | */ | 230 | */ |
231 | string = ACPI_MEM_CALLOCATE(string_size + 1); | 231 | string = ACPI_ALLOCATE_ZEROED(string_size + 1); |
232 | if (!string) { | 232 | if (!string) { |
233 | ACPI_ERROR((AE_INFO, "Could not allocate size %X", | 233 | ACPI_ERROR((AE_INFO, "Could not allocate size %X", |
234 | (u32) string_size)); | 234 | (u32) string_size)); |
@@ -320,6 +320,7 @@ void *acpi_ut_allocate_object_desc_dbg(char *module_name, | |||
320 | } | 320 | } |
321 | 321 | ||
322 | /* Mark the descriptor type */ | 322 | /* Mark the descriptor type */ |
323 | |||
323 | memset(object, 0, sizeof(union acpi_operand_object)); | 324 | memset(object, 0, sizeof(union acpi_operand_object)); |
324 | ACPI_SET_DESCRIPTOR_TYPE(object, ACPI_DESC_TYPE_OPERAND); | 325 | ACPI_SET_DESCRIPTOR_TYPE(object, ACPI_DESC_TYPE_OPERAND); |
325 | 326 | ||
diff --git a/drivers/acpi/utilities/utxface.c b/drivers/acpi/utilities/utxface.c index 308a960871be..ac90048a8a5b 100644 --- a/drivers/acpi/utilities/utxface.c +++ b/drivers/acpi/utilities/utxface.c | |||
@@ -41,8 +41,6 @@ | |||
41 | * POSSIBILITY OF SUCH DAMAGES. | 41 | * POSSIBILITY OF SUCH DAMAGES. |
42 | */ | 42 | */ |
43 | 43 | ||
44 | #include <linux/module.h> | ||
45 | |||
46 | #include <acpi/acpi.h> | 44 | #include <acpi/acpi.h> |
47 | #include <acpi/acevents.h> | 45 | #include <acpi/acevents.h> |
48 | #include <acpi/acnamesp.h> | 46 | #include <acpi/acnamesp.h> |
@@ -109,6 +107,8 @@ acpi_status acpi_initialize_subsystem(void) | |||
109 | return_ACPI_STATUS(status); | 107 | return_ACPI_STATUS(status); |
110 | } | 108 | } |
111 | 109 | ||
110 | ACPI_EXPORT_SYMBOL(acpi_initialize_subsystem) | ||
111 | |||
112 | /******************************************************************************* | 112 | /******************************************************************************* |
113 | * | 113 | * |
114 | * FUNCTION: acpi_enable_subsystem | 114 | * FUNCTION: acpi_enable_subsystem |
@@ -121,7 +121,6 @@ acpi_status acpi_initialize_subsystem(void) | |||
121 | * Puts system into ACPI mode if it isn't already. | 121 | * Puts system into ACPI mode if it isn't already. |
122 | * | 122 | * |
123 | ******************************************************************************/ | 123 | ******************************************************************************/ |
124 | |||
125 | acpi_status acpi_enable_subsystem(u32 flags) | 124 | acpi_status acpi_enable_subsystem(u32 flags) |
126 | { | 125 | { |
127 | acpi_status status = AE_OK; | 126 | acpi_status status = AE_OK; |
@@ -229,6 +228,8 @@ acpi_status acpi_enable_subsystem(u32 flags) | |||
229 | return_ACPI_STATUS(status); | 228 | return_ACPI_STATUS(status); |
230 | } | 229 | } |
231 | 230 | ||
231 | ACPI_EXPORT_SYMBOL(acpi_enable_subsystem) | ||
232 | |||
232 | /******************************************************************************* | 233 | /******************************************************************************* |
233 | * | 234 | * |
234 | * FUNCTION: acpi_initialize_objects | 235 | * FUNCTION: acpi_initialize_objects |
@@ -241,7 +242,6 @@ acpi_status acpi_enable_subsystem(u32 flags) | |||
241 | * objects and executing AML code for Regions, buffers, etc. | 242 | * objects and executing AML code for Regions, buffers, etc. |
242 | * | 243 | * |
243 | ******************************************************************************/ | 244 | ******************************************************************************/ |
244 | |||
245 | acpi_status acpi_initialize_objects(u32 flags) | 245 | acpi_status acpi_initialize_objects(u32 flags) |
246 | { | 246 | { |
247 | acpi_status status = AE_OK; | 247 | acpi_status status = AE_OK; |
@@ -305,6 +305,8 @@ acpi_status acpi_initialize_objects(u32 flags) | |||
305 | return_ACPI_STATUS(status); | 305 | return_ACPI_STATUS(status); |
306 | } | 306 | } |
307 | 307 | ||
308 | ACPI_EXPORT_SYMBOL(acpi_initialize_objects) | ||
309 | |||
308 | /******************************************************************************* | 310 | /******************************************************************************* |
309 | * | 311 | * |
310 | * FUNCTION: acpi_terminate | 312 | * FUNCTION: acpi_terminate |
@@ -316,7 +318,6 @@ acpi_status acpi_initialize_objects(u32 flags) | |||
316 | * DESCRIPTION: Shutdown the ACPI subsystem. Release all resources. | 318 | * DESCRIPTION: Shutdown the ACPI subsystem. Release all resources. |
317 | * | 319 | * |
318 | ******************************************************************************/ | 320 | ******************************************************************************/ |
319 | |||
320 | acpi_status acpi_terminate(void) | 321 | acpi_status acpi_terminate(void) |
321 | { | 322 | { |
322 | acpi_status status; | 323 | acpi_status status; |
@@ -348,6 +349,8 @@ acpi_status acpi_terminate(void) | |||
348 | return_ACPI_STATUS(status); | 349 | return_ACPI_STATUS(status); |
349 | } | 350 | } |
350 | 351 | ||
352 | ACPI_EXPORT_SYMBOL(acpi_terminate) | ||
353 | |||
351 | #ifdef ACPI_FUTURE_USAGE | 354 | #ifdef ACPI_FUTURE_USAGE |
352 | /******************************************************************************* | 355 | /******************************************************************************* |
353 | * | 356 | * |
@@ -362,7 +365,6 @@ acpi_status acpi_terminate(void) | |||
362 | * initialized successfully. | 365 | * initialized successfully. |
363 | * | 366 | * |
364 | ******************************************************************************/ | 367 | ******************************************************************************/ |
365 | |||
366 | acpi_status acpi_subsystem_status(void) | 368 | acpi_status acpi_subsystem_status(void) |
367 | { | 369 | { |
368 | 370 | ||
@@ -373,6 +375,8 @@ acpi_status acpi_subsystem_status(void) | |||
373 | } | 375 | } |
374 | } | 376 | } |
375 | 377 | ||
378 | ACPI_EXPORT_SYMBOL(acpi_subsystem_status) | ||
379 | |||
376 | /******************************************************************************* | 380 | /******************************************************************************* |
377 | * | 381 | * |
378 | * FUNCTION: acpi_get_system_info | 382 | * FUNCTION: acpi_get_system_info |
@@ -390,7 +394,6 @@ acpi_status acpi_subsystem_status(void) | |||
390 | * and the value of out_buffer is undefined. | 394 | * and the value of out_buffer is undefined. |
391 | * | 395 | * |
392 | ******************************************************************************/ | 396 | ******************************************************************************/ |
393 | |||
394 | acpi_status acpi_get_system_info(struct acpi_buffer * out_buffer) | 397 | acpi_status acpi_get_system_info(struct acpi_buffer * out_buffer) |
395 | { | 398 | { |
396 | struct acpi_system_info *info_ptr; | 399 | struct acpi_system_info *info_ptr; |
@@ -456,7 +459,7 @@ acpi_status acpi_get_system_info(struct acpi_buffer * out_buffer) | |||
456 | return_ACPI_STATUS(AE_OK); | 459 | return_ACPI_STATUS(AE_OK); |
457 | } | 460 | } |
458 | 461 | ||
459 | EXPORT_SYMBOL(acpi_get_system_info); | 462 | ACPI_EXPORT_SYMBOL(acpi_get_system_info) |
460 | 463 | ||
461 | /***************************************************************************** | 464 | /***************************************************************************** |
462 | * | 465 | * |
@@ -472,7 +475,6 @@ EXPORT_SYMBOL(acpi_get_system_info); | |||
472 | * TBD: When a second function is added, must save the Function also. | 475 | * TBD: When a second function is added, must save the Function also. |
473 | * | 476 | * |
474 | ****************************************************************************/ | 477 | ****************************************************************************/ |
475 | |||
476 | acpi_status | 478 | acpi_status |
477 | acpi_install_initialization_handler(acpi_init_handler handler, u32 function) | 479 | acpi_install_initialization_handler(acpi_init_handler handler, u32 function) |
478 | { | 480 | { |
@@ -489,6 +491,7 @@ acpi_install_initialization_handler(acpi_init_handler handler, u32 function) | |||
489 | return AE_OK; | 491 | return AE_OK; |
490 | } | 492 | } |
491 | 493 | ||
494 | ACPI_EXPORT_SYMBOL(acpi_install_initialization_handler) | ||
492 | #endif /* ACPI_FUTURE_USAGE */ | 495 | #endif /* ACPI_FUTURE_USAGE */ |
493 | 496 | ||
494 | /***************************************************************************** | 497 | /***************************************************************************** |
@@ -502,7 +505,6 @@ acpi_install_initialization_handler(acpi_init_handler handler, u32 function) | |||
502 | * DESCRIPTION: Empty all caches (delete the cached objects) | 505 | * DESCRIPTION: Empty all caches (delete the cached objects) |
503 | * | 506 | * |
504 | ****************************************************************************/ | 507 | ****************************************************************************/ |
505 | |||
506 | acpi_status acpi_purge_cached_objects(void) | 508 | acpi_status acpi_purge_cached_objects(void) |
507 | { | 509 | { |
508 | ACPI_FUNCTION_TRACE("acpi_purge_cached_objects"); | 510 | ACPI_FUNCTION_TRACE("acpi_purge_cached_objects"); |
@@ -513,3 +515,5 @@ acpi_status acpi_purge_cached_objects(void) | |||
513 | (void)acpi_os_purge_cache(acpi_gbl_ps_node_ext_cache); | 515 | (void)acpi_os_purge_cache(acpi_gbl_ps_node_ext_cache); |
514 | return_ACPI_STATUS(AE_OK); | 516 | return_ACPI_STATUS(AE_OK); |
515 | } | 517 | } |
518 | |||
519 | ACPI_EXPORT_SYMBOL(acpi_purge_cached_objects) | ||
diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h index 788502256222..ebe793fc137f 100644 --- a/include/acpi/acconfig.h +++ b/include/acpi/acconfig.h | |||
@@ -63,7 +63,7 @@ | |||
63 | 63 | ||
64 | /* Current ACPICA subsystem version in YYYYMMDD format */ | 64 | /* Current ACPICA subsystem version in YYYYMMDD format */ |
65 | 65 | ||
66 | #define ACPI_CA_VERSION 0x20060217 | 66 | #define ACPI_CA_VERSION 0x20060310 |
67 | 67 | ||
68 | /* | 68 | /* |
69 | * OS name, used for the _OS object. The _OS object is essentially obsolete, | 69 | * OS name, used for the _OS object. The _OS object is essentially obsolete, |
@@ -102,9 +102,9 @@ | |||
102 | 102 | ||
103 | #define ACPI_MAX_SEMAPHORE_COUNT 256 | 103 | #define ACPI_MAX_SEMAPHORE_COUNT 256 |
104 | 104 | ||
105 | /* Max reference count (for debug only) */ | 105 | /* Maximum object reference count (detects object deletion issues) */ |
106 | 106 | ||
107 | #define ACPI_MAX_REFERENCE_COUNT 0x400 | 107 | #define ACPI_MAX_REFERENCE_COUNT 0x800 |
108 | 108 | ||
109 | /* Size of cached memory mapping for system memory operation region */ | 109 | /* Size of cached memory mapping for system memory operation region */ |
110 | 110 | ||
diff --git a/include/acpi/acdisasm.h b/include/acpi/acdisasm.h index 0727c132bd3c..f004461a7753 100644 --- a/include/acpi/acdisasm.h +++ b/include/acpi/acdisasm.h | |||
@@ -50,6 +50,7 @@ | |||
50 | #define BLOCK_PAREN 1 | 50 | #define BLOCK_PAREN 1 |
51 | #define BLOCK_BRACE 2 | 51 | #define BLOCK_BRACE 2 |
52 | #define BLOCK_COMMA_LIST 4 | 52 | #define BLOCK_COMMA_LIST 4 |
53 | #define ACPI_DEFAULT_RESNAME *(u32 *) "__RD" | ||
53 | 54 | ||
54 | struct acpi_external_list { | 55 | struct acpi_external_list { |
55 | char *path; | 56 | char *path; |
@@ -78,6 +79,11 @@ typedef | |||
78 | acpi_status(*asl_walk_callback) (union acpi_parse_object * op, | 79 | acpi_status(*asl_walk_callback) (union acpi_parse_object * op, |
79 | u32 level, void *context); | 80 | u32 level, void *context); |
80 | 81 | ||
82 | struct acpi_resource_tag { | ||
83 | u32 bit_index; | ||
84 | char *tag; | ||
85 | }; | ||
86 | |||
81 | /* | 87 | /* |
82 | * dmwalk | 88 | * dmwalk |
83 | */ | 89 | */ |
@@ -85,6 +91,11 @@ void | |||
85 | acpi_dm_disassemble(struct acpi_walk_state *walk_state, | 91 | acpi_dm_disassemble(struct acpi_walk_state *walk_state, |
86 | union acpi_parse_object *origin, u32 num_opcodes); | 92 | union acpi_parse_object *origin, u32 num_opcodes); |
87 | 93 | ||
94 | void | ||
95 | acpi_dm_walk_parse_tree(union acpi_parse_object *op, | ||
96 | asl_walk_callback descending_callback, | ||
97 | asl_walk_callback ascending_callback, void *context); | ||
98 | |||
88 | /* | 99 | /* |
89 | * dmopcode | 100 | * dmopcode |
90 | */ | 101 | */ |
@@ -167,6 +178,7 @@ void acpi_dm_dump_integer64(u64 value, char *name); | |||
167 | 178 | ||
168 | void | 179 | void |
169 | acpi_dm_resource_template(struct acpi_op_walk_info *info, | 180 | acpi_dm_resource_template(struct acpi_op_walk_info *info, |
181 | union acpi_parse_object *op, | ||
170 | u8 * byte_data, u32 byte_count); | 182 | u8 * byte_data, u32 byte_count); |
171 | 183 | ||
172 | u8 acpi_dm_is_resource_template(union acpi_parse_object *op); | 184 | u8 acpi_dm_is_resource_template(union acpi_parse_object *op); |
@@ -177,6 +189,8 @@ void acpi_dm_bit_list(u16 mask); | |||
177 | 189 | ||
178 | void acpi_dm_decode_attribute(u8 attribute); | 190 | void acpi_dm_decode_attribute(u8 attribute); |
179 | 191 | ||
192 | void acpi_dm_descriptor_name(void); | ||
193 | |||
180 | /* | 194 | /* |
181 | * dmresrcl | 195 | * dmresrcl |
182 | */ | 196 | */ |
@@ -251,4 +265,13 @@ acpi_dm_vendor_small_descriptor(union aml_resource *resource, | |||
251 | */ | 265 | */ |
252 | void acpi_dm_add_to_external_list(char *path); | 266 | void acpi_dm_add_to_external_list(char *path); |
253 | 267 | ||
268 | /* | ||
269 | * dmrestag | ||
270 | */ | ||
271 | void acpi_dm_find_resources(union acpi_parse_object *root); | ||
272 | |||
273 | void | ||
274 | acpi_dm_check_resource_reference(union acpi_parse_object *op, | ||
275 | struct acpi_walk_state *walk_state); | ||
276 | |||
254 | #endif /* __ACDISASM_H__ */ | 277 | #endif /* __ACDISASM_H__ */ |
diff --git a/include/acpi/aclocal.h b/include/acpi/aclocal.h index 8361820d2970..94fbf96ed3df 100644 --- a/include/acpi/aclocal.h +++ b/include/acpi/aclocal.h | |||
@@ -129,7 +129,7 @@ typedef u8 acpi_owner_id; | |||
129 | struct acpi_mutex_info { | 129 | struct acpi_mutex_info { |
130 | acpi_mutex mutex; | 130 | acpi_mutex mutex; |
131 | u32 use_count; | 131 | u32 use_count; |
132 | u32 thread_id; | 132 | acpi_thread_id thread_id; |
133 | }; | 133 | }; |
134 | 134 | ||
135 | /* Lock flag parameter for various interfaces */ | 135 | /* Lock flag parameter for various interfaces */ |
@@ -181,9 +181,9 @@ struct acpi_namespace_node { | |||
181 | u8 owner_id; /* Who created this node */ | 181 | u8 owner_id; /* Who created this node */ |
182 | u8 flags; | 182 | u8 flags; |
183 | 183 | ||
184 | /* Fields used by the ASL compiler only */ | 184 | /* Fields used by the ASL compiler and disassembler only */ |
185 | 185 | ||
186 | #ifdef ACPI_ASL_COMPILER | 186 | #ifdef ACPI_LARGE_NAMESPACE_NODE |
187 | u32 value; | 187 | u32 value; |
188 | union acpi_parse_object *op; | 188 | union acpi_parse_object *op; |
189 | #endif | 189 | #endif |
@@ -479,7 +479,7 @@ struct acpi_pscope_state { | |||
479 | struct acpi_thread_state { | 479 | struct acpi_thread_state { |
480 | ACPI_STATE_COMMON struct acpi_walk_state *walk_state_list; /* Head of list of walk_states for this thread */ | 480 | ACPI_STATE_COMMON struct acpi_walk_state *walk_state_list; /* Head of list of walk_states for this thread */ |
481 | union acpi_operand_object *acquired_mutex_list; /* List of all currently acquired mutexes */ | 481 | union acpi_operand_object *acquired_mutex_list; /* List of all currently acquired mutexes */ |
482 | u32 thread_id; /* Running thread ID */ | 482 | acpi_thread_id thread_id; /* Running thread ID */ |
483 | u8 current_sync_level; /* Mutex Sync (nested acquire) level */ | 483 | u8 current_sync_level; /* Mutex Sync (nested acquire) level */ |
484 | }; | 484 | }; |
485 | 485 | ||
diff --git a/include/acpi/acmacros.h b/include/acpi/acmacros.h index dd5644dbe946..c8aa73fc6dd3 100644 --- a/include/acpi/acmacros.h +++ b/include/acpi/acmacros.h | |||
@@ -713,18 +713,18 @@ | |||
713 | 713 | ||
714 | /* Memory allocation */ | 714 | /* Memory allocation */ |
715 | 715 | ||
716 | #define ACPI_MEM_ALLOCATE(a) acpi_ut_allocate((acpi_size)(a),_COMPONENT,_acpi_module_name,__LINE__) | 716 | #define ACPI_ALLOCATE(a) acpi_ut_allocate((acpi_size)(a),_COMPONENT,_acpi_module_name,__LINE__) |
717 | #define ACPI_MEM_CALLOCATE(a) acpi_ut_callocate((acpi_size)(a), _COMPONENT,_acpi_module_name,__LINE__) | 717 | #define ACPI_ALLOCATE_ZEROED(a) acpi_ut_callocate((acpi_size)(a), _COMPONENT,_acpi_module_name,__LINE__) |
718 | #define ACPI_MEM_FREE(a) acpi_os_free(a) | 718 | #define ACPI_FREE(a) acpi_os_free(a) |
719 | #define ACPI_MEM_TRACKING(a) | 719 | #define ACPI_MEM_TRACKING(a) |
720 | 720 | ||
721 | #else | 721 | #else |
722 | 722 | ||
723 | /* Memory allocation */ | 723 | /* Memory allocation */ |
724 | 724 | ||
725 | #define ACPI_MEM_ALLOCATE(a) acpi_ut_allocate_and_track((acpi_size)(a),_COMPONENT,_acpi_module_name,__LINE__) | 725 | #define ACPI_ALLOCATE(a) acpi_ut_allocate_and_track((acpi_size)(a),_COMPONENT,_acpi_module_name,__LINE__) |
726 | #define ACPI_MEM_CALLOCATE(a) acpi_ut_callocate_and_track((acpi_size)(a), _COMPONENT,_acpi_module_name,__LINE__) | 726 | #define ACPI_ALLOCATE_ZEROED(a) acpi_ut_callocate_and_track((acpi_size)(a), _COMPONENT,_acpi_module_name,__LINE__) |
727 | #define ACPI_MEM_FREE(a) acpi_ut_free_and_track(a,_COMPONENT,_acpi_module_name,__LINE__) | 727 | #define ACPI_FREE(a) acpi_ut_free_and_track(a,_COMPONENT,_acpi_module_name,__LINE__) |
728 | #define ACPI_MEM_TRACKING(a) a | 728 | #define ACPI_MEM_TRACKING(a) a |
729 | 729 | ||
730 | #endif /* ACPI_DBG_TRACK_ALLOCATIONS */ | 730 | #endif /* ACPI_DBG_TRACK_ALLOCATIONS */ |
diff --git a/include/acpi/acnamesp.h b/include/acpi/acnamesp.h index b667a804fc8a..132d64af24fe 100644 --- a/include/acpi/acnamesp.h +++ b/include/acpi/acnamesp.h | |||
@@ -63,6 +63,7 @@ | |||
63 | #define ACPI_NS_DONT_OPEN_SCOPE 0x02 | 63 | #define ACPI_NS_DONT_OPEN_SCOPE 0x02 |
64 | #define ACPI_NS_NO_PEER_SEARCH 0x04 | 64 | #define ACPI_NS_NO_PEER_SEARCH 0x04 |
65 | #define ACPI_NS_ERROR_IF_FOUND 0x08 | 65 | #define ACPI_NS_ERROR_IF_FOUND 0x08 |
66 | #define ACPI_NS_PREFIX_IS_SCOPE 0x10 | ||
66 | 67 | ||
67 | #define ACPI_NS_WALK_UNLOCK TRUE | 68 | #define ACPI_NS_WALK_UNLOCK TRUE |
68 | #define ACPI_NS_WALK_NO_UNLOCK FALSE | 69 | #define ACPI_NS_WALK_NO_UNLOCK FALSE |
@@ -184,6 +185,10 @@ acpi_ns_evaluate_relative(char *pathname, struct acpi_parameter_info *info); | |||
184 | */ | 185 | */ |
185 | u32 acpi_ns_opens_scope(acpi_object_type type); | 186 | u32 acpi_ns_opens_scope(acpi_object_type type); |
186 | 187 | ||
188 | void | ||
189 | acpi_ns_build_external_path(struct acpi_namespace_node *node, | ||
190 | acpi_size size, char *name_buffer); | ||
191 | |||
187 | char *acpi_ns_get_external_pathname(struct acpi_namespace_node *node); | 192 | char *acpi_ns_get_external_pathname(struct acpi_namespace_node *node); |
188 | 193 | ||
189 | char *acpi_ns_name_of_current_scope(struct acpi_walk_state *walk_state); | 194 | char *acpi_ns_name_of_current_scope(struct acpi_walk_state *walk_state); |
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h index 970e9a6372c3..91c3cdff28bb 100644 --- a/include/acpi/acpiosxf.h +++ b/include/acpi/acpiosxf.h | |||
@@ -161,7 +161,7 @@ acpi_os_remove_interrupt_handler(u32 gsi, acpi_osd_handler service_routine); | |||
161 | /* | 161 | /* |
162 | * Threads and Scheduling | 162 | * Threads and Scheduling |
163 | */ | 163 | */ |
164 | u32 acpi_os_get_thread_id(void); | 164 | acpi_thread_id acpi_os_get_thread_id(void); |
165 | 165 | ||
166 | acpi_status | 166 | acpi_status |
167 | acpi_os_queue_for_execution(u32 priority, | 167 | acpi_os_queue_for_execution(u32 priority, |
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index 95c3c8b6d618..520f315dd53a 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h | |||
@@ -288,6 +288,21 @@ typedef acpi_native_uint acpi_size; | |||
288 | #define ACPI_UNUSED_VAR | 288 | #define ACPI_UNUSED_VAR |
289 | #endif | 289 | #endif |
290 | 290 | ||
291 | /* | ||
292 | * All ACPICA functions that are available to the rest of the kernel are | ||
293 | * tagged with this macro which can be defined as appropriate for the host. | ||
294 | */ | ||
295 | #ifndef ACPI_EXPORT_SYMBOL | ||
296 | #define ACPI_EXPORT_SYMBOL(symbol) | ||
297 | #endif | ||
298 | |||
299 | /* | ||
300 | * thread_id is returned by acpi_os_get_thread_id. | ||
301 | */ | ||
302 | #ifndef acpi_thread_id | ||
303 | #define acpi_thread_id acpi_native_uint | ||
304 | #endif | ||
305 | |||
291 | /******************************************************************************* | 306 | /******************************************************************************* |
292 | * | 307 | * |
293 | * Independent types | 308 | * Independent types |
diff --git a/include/acpi/amlresrc.h b/include/acpi/amlresrc.h index fb4735315ad3..e5b42eb38190 100644 --- a/include/acpi/amlresrc.h +++ b/include/acpi/amlresrc.h | |||
@@ -45,36 +45,36 @@ | |||
45 | #ifndef __AMLRESRC_H | 45 | #ifndef __AMLRESRC_H |
46 | #define __AMLRESRC_H | 46 | #define __AMLRESRC_H |
47 | 47 | ||
48 | #define ASL_RESNAME_ADDRESS "_ADR" | 48 | #define ACPI_RESTAG_ADDRESS "_ADR" |
49 | #define ASL_RESNAME_ALIGNMENT "_ALN" | 49 | #define ACPI_RESTAG_ALIGNMENT "_ALN" |
50 | #define ASL_RESNAME_ADDRESSSPACE "_ASI" | 50 | #define ACPI_RESTAG_ADDRESSSPACE "_ASI" |
51 | #define ASL_RESNAME_ACCESSSIZE "_ASZ" | 51 | #define ACPI_RESTAG_ACCESSSIZE "_ASZ" |
52 | #define ASL_RESNAME_TYPESPECIFICATTRIBUTES "_ATT" | 52 | #define ACPI_RESTAG_TYPESPECIFICATTRIBUTES "_ATT" |
53 | #define ASL_RESNAME_BASEADDRESS "_BAS" | 53 | #define ACPI_RESTAG_BASEADDRESS "_BAS" |
54 | #define ASL_RESNAME_BUSMASTER "_BM_" /* Master(1), Slave(0) */ | 54 | #define ACPI_RESTAG_BUSMASTER "_BM_" /* Master(1), Slave(0) */ |
55 | #define ASL_RESNAME_DECODE "_DEC" | 55 | #define ACPI_RESTAG_DECODE "_DEC" |
56 | #define ASL_RESNAME_DMA "_DMA" | 56 | #define ACPI_RESTAG_DMA "_DMA" |
57 | #define ASL_RESNAME_DMATYPE "_TYP" /* Compatible(0), A(1), B(2), F(3) */ | 57 | #define ACPI_RESTAG_DMATYPE "_TYP" /* Compatible(0), A(1), B(2), F(3) */ |
58 | #define ASL_RESNAME_GRANULARITY "_GRA" | 58 | #define ACPI_RESTAG_GRANULARITY "_GRA" |
59 | #define ASL_RESNAME_INTERRUPT "_INT" | 59 | #define ACPI_RESTAG_INTERRUPT "_INT" |
60 | #define ASL_RESNAME_INTERRUPTLEVEL "_LL_" /* active_lo(1), active_hi(0) */ | 60 | #define ACPI_RESTAG_INTERRUPTLEVEL "_LL_" /* active_lo(1), active_hi(0) */ |
61 | #define ASL_RESNAME_INTERRUPTSHARE "_SHR" /* Shareable(1), no_share(0) */ | 61 | #define ACPI_RESTAG_INTERRUPTSHARE "_SHR" /* Shareable(1), no_share(0) */ |
62 | #define ASL_RESNAME_INTERRUPTTYPE "_HE_" /* Edge(1), Level(0) */ | 62 | #define ACPI_RESTAG_INTERRUPTTYPE "_HE_" /* Edge(1), Level(0) */ |
63 | #define ASL_RESNAME_LENGTH "_LEN" | 63 | #define ACPI_RESTAG_LENGTH "_LEN" |
64 | #define ASL_RESNAME_MEMATTRIBUTES "_MTP" /* Memory(0), Reserved(1), ACPI(2), NVS(3) */ | 64 | #define ACPI_RESTAG_MEMATTRIBUTES "_MTP" /* Memory(0), Reserved(1), ACPI(2), NVS(3) */ |
65 | #define ASL_RESNAME_MEMTYPE "_MEM" /* non_cache(0), Cacheable(1) Cache+combine(2), Cache+prefetch(3) */ | 65 | #define ACPI_RESTAG_MEMTYPE "_MEM" /* non_cache(0), Cacheable(1) Cache+combine(2), Cache+prefetch(3) */ |
66 | #define ASL_RESNAME_MAXADDR "_MAX" | 66 | #define ACPI_RESTAG_MAXADDR "_MAX" |
67 | #define ASL_RESNAME_MINADDR "_MIN" | 67 | #define ACPI_RESTAG_MINADDR "_MIN" |
68 | #define ASL_RESNAME_MAXTYPE "_MAF" | 68 | #define ACPI_RESTAG_MAXTYPE "_MAF" |
69 | #define ASL_RESNAME_MINTYPE "_MIF" | 69 | #define ACPI_RESTAG_MINTYPE "_MIF" |
70 | #define ASL_RESNAME_REGISTERBITOFFSET "_RBO" | 70 | #define ACPI_RESTAG_REGISTERBITOFFSET "_RBO" |
71 | #define ASL_RESNAME_REGISTERBITWIDTH "_RBW" | 71 | #define ACPI_RESTAG_REGISTERBITWIDTH "_RBW" |
72 | #define ASL_RESNAME_RANGETYPE "_RNG" | 72 | #define ACPI_RESTAG_RANGETYPE "_RNG" |
73 | #define ASL_RESNAME_READWRITETYPE "_RW_" /* read_only(0), Writeable (1) */ | 73 | #define ACPI_RESTAG_READWRITETYPE "_RW_" /* read_only(0), Writeable (1) */ |
74 | #define ASL_RESNAME_TRANSLATION "_TRA" | 74 | #define ACPI_RESTAG_TRANSLATION "_TRA" |
75 | #define ASL_RESNAME_TRANSTYPE "_TRS" /* Sparse(1), Dense(0) */ | 75 | #define ACPI_RESTAG_TRANSTYPE "_TRS" /* Sparse(1), Dense(0) */ |
76 | #define ASL_RESNAME_TYPE "_TTP" /* Translation(1), Static (0) */ | 76 | #define ACPI_RESTAG_TYPE "_TTP" /* Translation(1), Static (0) */ |
77 | #define ASL_RESNAME_XFERTYPE "_SIz" /* 8(0), 8_and16(1), 16(2) */ | 77 | #define ACPI_RESTAG_XFERTYPE "_SIz" /* 8(0), 8_and16(1), 16(2) */ |
78 | 78 | ||
79 | /* Default sizes for "small" resource descriptors */ | 79 | /* Default sizes for "small" resource descriptors */ |
80 | 80 | ||
@@ -266,6 +266,7 @@ struct aml_resource_generic_register { | |||
266 | union aml_resource { | 266 | union aml_resource { |
267 | /* Descriptor headers */ | 267 | /* Descriptor headers */ |
268 | 268 | ||
269 | u8 descriptor_type; | ||
269 | struct aml_resource_small_header small_header; | 270 | struct aml_resource_small_header small_header; |
270 | struct aml_resource_large_header large_header; | 271 | struct aml_resource_large_header large_header; |
271 | 272 | ||
diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h index 223ec6467108..d5a7f566c018 100644 --- a/include/acpi/platform/acenv.h +++ b/include/acpi/platform/acenv.h | |||
@@ -59,6 +59,7 @@ | |||
59 | #define ACPI_APPLICATION | 59 | #define ACPI_APPLICATION |
60 | #define ACPI_DISASSEMBLER | 60 | #define ACPI_DISASSEMBLER |
61 | #define ACPI_NO_METHOD_EXECUTION | 61 | #define ACPI_NO_METHOD_EXECUTION |
62 | #define ACPI_LARGE_NAMESPACE_NODE | ||
62 | #endif | 63 | #endif |
63 | 64 | ||
64 | #ifdef ACPI_EXEC_APP | 65 | #ifdef ACPI_EXEC_APP |
@@ -76,6 +77,7 @@ | |||
76 | #define ACPI_APPLICATION | 77 | #define ACPI_APPLICATION |
77 | #define ACPI_DISASSEMBLER | 78 | #define ACPI_DISASSEMBLER |
78 | #define ACPI_CONSTANT_EVAL_ONLY | 79 | #define ACPI_CONSTANT_EVAL_ONLY |
80 | #define ACPI_LARGE_NAMESPACE_NODE | ||
79 | #endif | 81 | #endif |
80 | 82 | ||
81 | #ifdef ACPI_APPLICATION | 83 | #ifdef ACPI_APPLICATION |
@@ -271,8 +273,8 @@ typedef char *va_list; | |||
271 | /* | 273 | /* |
272 | * Storage alignment properties | 274 | * Storage alignment properties |
273 | */ | 275 | */ |
274 | #define _AUPBND (sizeof (acpi_native_uint) - 1) | 276 | #define _AUPBND (sizeof (acpi_native_int) - 1) |
275 | #define _ADNBND (sizeof (acpi_native_uint) - 1) | 277 | #define _ADNBND (sizeof (acpi_native_int) - 1) |
276 | 278 | ||
277 | /* | 279 | /* |
278 | * Variable argument list macro definitions | 280 | * Variable argument list macro definitions |
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index 2e6d54569ee8..2f5bb5bd76b7 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h | |||
@@ -52,27 +52,22 @@ | |||
52 | #include <linux/config.h> | 52 | #include <linux/config.h> |
53 | #include <linux/string.h> | 53 | #include <linux/string.h> |
54 | #include <linux/kernel.h> | 54 | #include <linux/kernel.h> |
55 | #include <linux/module.h> | ||
55 | #include <linux/ctype.h> | 56 | #include <linux/ctype.h> |
56 | #include <asm/system.h> | 57 | #include <asm/system.h> |
57 | #include <asm/atomic.h> | 58 | #include <asm/atomic.h> |
58 | #include <asm/div64.h> | 59 | #include <asm/div64.h> |
59 | #include <asm/acpi.h> | 60 | #include <asm/acpi.h> |
61 | #include <linux/slab.h> | ||
60 | 62 | ||
61 | #define strtoul simple_strtoul | 63 | /* Host-dependent types and defines */ |
62 | |||
63 | #define ACPI_MACHINE_WIDTH BITS_PER_LONG | ||
64 | 64 | ||
65 | /* Type(s) for the OSL */ | 65 | #define ACPI_MACHINE_WIDTH BITS_PER_LONG |
66 | 66 | #define acpi_cache_t kmem_cache_t | |
67 | #ifdef ACPI_USE_LOCAL_CACHE | 67 | #define ACPI_EXPORT_SYMBOL(symbol) EXPORT_SYMBOL(symbol); |
68 | #define acpi_cache_t struct acpi_memory_list | 68 | #define strtoul simple_strtoul |
69 | #else | ||
70 | #include <linux/slab.h> | ||
71 | #define acpi_cache_t kmem_cache_t | ||
72 | #endif | ||
73 | 69 | ||
74 | /* Full namespace pathname length limit - arbitrary */ | 70 | /* Full namespace pathname length limit - arbitrary */ |
75 | |||
76 | #define ACPI_PATHNAME_MAX 256 | 71 | #define ACPI_PATHNAME_MAX 256 |
77 | 72 | ||
78 | #else /* !__KERNEL__ */ | 73 | #else /* !__KERNEL__ */ |