aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2006-10-03 00:00:00 -0400
committerLen Brown <len.brown@intel.com>2006-04-01 01:26:39 -0500
commit8313524a0d466f451a62709aaedf988d8257b21c (patch)
treed612fc796ae07d8a39542c95eec0f5169c9f64eb /drivers/acpi
parentea936b78f46cbe089a4ac363e1682dee7d427096 (diff)
ACPI: ACPICA 20060310
Tagged all external interfaces to the subsystem with the new ACPI_EXPORT_SYMBOL macro. This macro can be defined as necessary to assist kernel integration. For Linux, the macro resolves to the EXPORT_SYMBOL macro. The default definition is NULL. Added the ACPI_THREAD_ID type for the return value from acpi_os_get_thread_id(). This allows the host to define this as necessary to simplify kernel integration. The default definition is ACPI_NATIVE_UINT. Valery Podrezov fixed two interpreter problems related to error processing, the deletion of objects, and placing invalid pointers onto the internal operator result stack. http://bugzilla.kernel.org/show_bug.cgi?id=6028 http://bugzilla.kernel.org/show_bug.cgi?id=6151 Increased the reference count threshold where a warning is emitted for large reference counts in order to eliminate unnecessary warnings on systems with large namespaces (especially 64-bit.) Increased the value from 0x400 to 0x800. Due to universal disagreement as to the meaning of the 'c' in the calloc() function, the ACPI_MEM_CALLOCATE macro has been renamed to ACPI_ALLOCATE_ZEROED so that the purpose of the interface is 'clear'. ACPI_MEM_ALLOCATE and ACPI_MEM_FREE are renamed to ACPI_ALLOCATE and ACPI_FREE. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/dispatcher/dsmthdat.c2
-rw-r--r--drivers/acpi/dispatcher/dsobject.c9
-rw-r--r--drivers/acpi/dispatcher/dsutils.c2
-rw-r--r--drivers/acpi/dispatcher/dswload.c1
-rw-r--r--drivers/acpi/dispatcher/dswstate.c8
-rw-r--r--drivers/acpi/events/evgpeblk.c39
-rw-r--r--drivers/acpi/events/evregion.c2
-rw-r--r--drivers/acpi/events/evrgnini.c8
-rw-r--r--drivers/acpi/events/evxface.c32
-rw-r--r--drivers/acpi/events/evxfevnt.c40
-rw-r--r--drivers/acpi/events/evxfregn.c7
-rw-r--r--drivers/acpi/executer/exconfig.c4
-rw-r--r--drivers/acpi/executer/exdump.c2
-rw-r--r--drivers/acpi/executer/exfield.c4
-rw-r--r--drivers/acpi/executer/exnames.c4
-rw-r--r--drivers/acpi/executer/exoparg1.c17
-rw-r--r--drivers/acpi/executer/exoparg2.c4
-rw-r--r--drivers/acpi/executer/exoparg3.c9
-rw-r--r--drivers/acpi/executer/exregion.c10
-rw-r--r--drivers/acpi/executer/exstorob.c8
-rw-r--r--drivers/acpi/hardware/hwregs.c11
-rw-r--r--drivers/acpi/hardware/hwsleep.c18
-rw-r--r--drivers/acpi/hardware/hwtimer.c9
-rw-r--r--drivers/acpi/namespace/nsaccess.c19
-rw-r--r--drivers/acpi/namespace/nsalloc.c6
-rw-r--r--drivers/acpi/namespace/nsdumpdv.c2
-rw-r--r--drivers/acpi/namespace/nseval.c4
-rw-r--r--drivers/acpi/namespace/nsinit.c2
-rw-r--r--drivers/acpi/namespace/nsnames.c10
-rw-r--r--drivers/acpi/namespace/nsparse.c2
-rw-r--r--drivers/acpi/namespace/nssearch.c2
-rw-r--r--drivers/acpi/namespace/nsutils.c12
-rw-r--r--drivers/acpi/namespace/nsxfeval.c38
-rw-r--r--drivers/acpi/namespace/nsxfname.c16
-rw-r--r--drivers/acpi/namespace/nsxfobj.c10
-rw-r--r--drivers/acpi/parser/pstree.c1
-rw-r--r--drivers/acpi/resources/rsinfo.c1
-rw-r--r--drivers/acpi/resources/rsxface.c29
-rw-r--r--drivers/acpi/tables/tbconvrt.c8
-rw-r--r--drivers/acpi/tables/tbget.c2
-rw-r--r--drivers/acpi/tables/tbinstal.c8
-rw-r--r--drivers/acpi/tables/tbxface.c15
-rw-r--r--drivers/acpi/tables/tbxfroot.c22
-rw-r--r--drivers/acpi/utilities/utalloc.c2
-rw-r--r--drivers/acpi/utilities/utcache.c8
-rw-r--r--drivers/acpi/utilities/utcopy.c24
-rw-r--r--drivers/acpi/utilities/utdebug.c23
-rw-r--r--drivers/acpi/utilities/utdelete.c4
-rw-r--r--drivers/acpi/utilities/uteval.c4
-rw-r--r--drivers/acpi/utilities/utglobal.c6
-rw-r--r--drivers/acpi/utilities/utinit.c8
-rw-r--r--drivers/acpi/utilities/utmisc.c2
-rw-r--r--drivers/acpi/utilities/utmutex.c4
-rw-r--r--drivers/acpi/utilities/utobject.c5
-rw-r--r--drivers/acpi/utilities/utxface.c24
55 files changed, 268 insertions, 305 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
92ACPI_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
111acpi_status 110acpi_status
112acpi_install_fixed_event_handler(u32 event, 111acpi_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
164EXPORT_SYMBOL(acpi_install_fixed_event_handler); 163ACPI_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
179acpi_status 177acpi_status
180acpi_remove_fixed_event_handler(u32 event, acpi_event_handler handler) 178acpi_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
219EXPORT_SYMBOL(acpi_remove_fixed_event_handler); 217ACPI_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
239acpi_status 236acpi_status
240acpi_install_notify_handler(acpi_handle device, 237acpi_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
387EXPORT_SYMBOL(acpi_install_notify_handler); 384ACPI_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
406acpi_status 402acpi_status
407acpi_remove_notify_handler(acpi_handle device, 403acpi_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
541EXPORT_SYMBOL(acpi_remove_notify_handler); 537ACPI_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
561acpi_status 556acpi_status
562acpi_install_gpe_handler(acpi_handle gpe_device, 557acpi_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
636EXPORT_SYMBOL(acpi_install_gpe_handler); 631ACPI_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
653acpi_status 647acpi_status
654acpi_remove_gpe_handler(acpi_handle gpe_device, 648acpi_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
737EXPORT_SYMBOL(acpi_remove_gpe_handler); 731ACPI_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
753acpi_status acpi_acquire_global_lock(u16 timeout, u32 * handle) 746acpi_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
777EXPORT_SYMBOL(acpi_acquire_global_lock); 770ACPI_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
791acpi_status acpi_release_global_lock(u32 handle) 783acpi_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
803EXPORT_SYMBOL(acpi_release_global_lock); 795ACPI_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
95ACPI_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
109acpi_status acpi_disable(void) 108acpi_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
139ACPI_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
153acpi_status acpi_enable_event(u32 event, u32 flags) 153acpi_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
196EXPORT_SYMBOL(acpi_enable_event); 196ACPI_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
212acpi_status acpi_set_gpe_type(acpi_handle gpe_device, u32 gpe_number, u8 type) 211acpi_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
239EXPORT_SYMBOL(acpi_set_gpe_type); 238ACPI_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
256acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags) 254acpi_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
291EXPORT_SYMBOL(acpi_enable_gpe); 289ACPI_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
308acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags) 305acpi_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
338ACPI_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
354acpi_status acpi_disable_event(u32 event, u32 flags) 352acpi_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
395EXPORT_SYMBOL(acpi_disable_event); 393ACPI_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
409acpi_status acpi_clear_event(u32 event) 406acpi_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
432EXPORT_SYMBOL(acpi_clear_event); 429ACPI_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
448acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags) 444acpi_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
477ACPI_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
496acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status) 493acpi_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
518ACPI_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
537acpi_status 535acpi_status
538acpi_get_gpe_status(acpi_handle gpe_device, 536acpi_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
572ACPI_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
590acpi_status 589acpi_status
591acpi_install_gpe_block(acpi_handle gpe_device, 590acpi_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
669EXPORT_SYMBOL(acpi_install_gpe_block); 668ACPI_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
683acpi_status acpi_remove_gpe_block(acpi_handle gpe_device) 681acpi_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
725EXPORT_SYMBOL(acpi_remove_gpe_block); 723ACPI_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
117EXPORT_SYMBOL(acpi_install_address_space_handler); 115ACPI_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
133acpi_status 130acpi_status
134acpi_remove_address_space_handler(acpi_handle device, 131acpi_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
245EXPORT_SYMBOL(acpi_remove_address_space_handler); 242ACPI_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
223EXPORT_SYMBOL(acpi_get_sleep_type_data); 221ACPI_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
237struct acpi_bit_register_info *acpi_hw_get_bit_register_info(u32 register_id) 234struct 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
315EXPORT_SYMBOL(acpi_get_register); 312ACPI_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
332acpi_status acpi_set_register(u32 register_id, u32 value, u32 flags) 328acpi_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
478EXPORT_SYMBOL(acpi_set_register); 474ACPI_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
495acpi_status 490acpi_status
496acpi_hw_register_read(u8 use_lock, u32 register_id, u32 * return_value) 491acpi_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
81ACPI_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
97acpi_status 97acpi_status
98acpi_get_firmware_waking_vector(acpi_physical_address * physical_address) 98acpi_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
122ACPI_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
138acpi_status acpi_enter_sleep_state_prep(u8 sleep_state) 139acpi_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
210ACPI_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
222acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state) 224acpi_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
381EXPORT_SYMBOL(acpi_enter_sleep_state); 383ACPI_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
396acpi_status asmlinkage acpi_enter_sleep_state_s4bios(void) 397acpi_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
446EXPORT_SYMBOL(acpi_enter_sleep_state_s4bios); 447ACPI_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
461acpi_status acpi_leave_sleep_state(u8 sleep_state) 461acpi_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
588ACPI_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
78ACPI_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
91acpi_status acpi_get_timer(u32 * ticks) 91acpi_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
106EXPORT_SYMBOL(acpi_get_timer); 106ACPI_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
137acpi_status 136acpi_status
138acpi_get_timer_duration(u32 start_ticks, u32 end_ticks, u32 * time_elapsed) 137acpi_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
187EXPORT_SYMBOL(acpi_get_timer_duration); 186ACPI_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
49ACPI_MODULE_NAME("nsnames") 49ACPI_MODULE_NAME("nsnames")
50 50
51/* Local prototypes */
52static void
53acpi_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 65void
71static void
72acpi_ns_build_external_path(struct acpi_namespace_node *node, 66acpi_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 ******************************************************************************/
64acpi_status 64acpi_status
65acpi_ns_one_complete_parse(u8 pass_number, struct acpi_table_desc * table_desc) 65acpi_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
52ACPI_MODULE_NAME("nsxfeval") 50ACPI_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
75acpi_status 73acpi_status
76acpi_evaluate_object_typed(acpi_handle handle, 74acpi_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
144ACPI_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
167acpi_status 166acpi_status
168acpi_evaluate_object(acpi_handle handle, 167acpi_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
359EXPORT_SYMBOL(acpi_evaluate_object); 358ACPI_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
391acpi_status 389acpi_status
392acpi_walk_namespace(acpi_object_type type, 390acpi_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
427EXPORT_SYMBOL(acpi_walk_namespace); 425ACPI_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
443static acpi_status 440static acpi_status
444acpi_ns_get_device_callback(acpi_handle obj_handle, 441acpi_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
595EXPORT_SYMBOL(acpi_get_devices); 592ACPI_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
611acpi_status 607acpi_status
612acpi_attach_data(acpi_handle obj_handle, 608acpi_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
640ACPI_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
657acpi_status 654acpi_status
658acpi_detach_data(acpi_handle obj_handle, acpi_object_handler handler) 655acpi_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
686ACPI_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
703acpi_status 701acpi_status
704acpi_get_data(acpi_handle obj_handle, acpi_object_handler handler, void **data) 702acpi_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
733ACPI_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
129EXPORT_SYMBOL(acpi_get_handle); 127ACPI_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
147acpi_status 144acpi_status
148acpi_get_name(acpi_handle handle, u32 name_type, struct acpi_buffer * buffer) 145acpi_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
207EXPORT_SYMBOL(acpi_get_name); 204ACPI_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
224acpi_status 220acpi_status
225acpi_get_object_info(acpi_handle handle, struct acpi_buffer * buffer) 221acpi_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
356EXPORT_SYMBOL(acpi_get_object_info); 352ACPI_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
104EXPORT_SYMBOL(acpi_get_type); 102ACPI_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
120acpi_status acpi_get_parent(acpi_handle handle, acpi_handle * ret_handle) 117acpi_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
165EXPORT_SYMBOL(acpi_get_parent); 162ACPI_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
185acpi_status 181acpi_status
186acpi_get_next_object(acpi_object_type type, 182acpi_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
246EXPORT_SYMBOL(acpi_get_next_object); 242ACPI_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
119ACPI_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
145acpi_status 144acpi_status
146acpi_get_current_resources(acpi_handle device_handle, 145acpi_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
172EXPORT_SYMBOL(acpi_get_current_resources); 171ACPI_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
196acpi_status 194acpi_status
197acpi_get_possible_resources(acpi_handle device_handle, 195acpi_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
223EXPORT_SYMBOL(acpi_get_possible_resources); 221ACPI_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
245acpi_status 242acpi_status
246acpi_walk_resources(acpi_handle device_handle, 243acpi_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
320EXPORT_SYMBOL(acpi_walk_resources); 317ACPI_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
340acpi_status 336acpi_status
341acpi_set_current_resources(acpi_handle device_handle, 337acpi_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
359EXPORT_SYMBOL(acpi_set_current_resources); 355ACPI_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
379acpi_status 374acpi_status
380acpi_resource_to_address64(struct acpi_resource *resource, 375acpi_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
420EXPORT_SYMBOL(acpi_resource_to_address64); 415ACPI_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
441acpi_status 435acpi_status
442acpi_get_vendor_resource(acpi_handle device_handle, 436acpi_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
466ACPI_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
484static acpi_status 479static acpi_status
485acpi_rs_match_vendor_resource(struct acpi_resource *resource, void *context) 480acpi_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
527ACPI_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
66u8 acpi_fadt_is_v1; 64u8 acpi_fadt_is_v1;
67EXPORT_SYMBOL(acpi_fadt_is_v1); 65ACPI_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
124ACPI_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
143acpi_status acpi_load_table(struct acpi_table_header *table_ptr) 142acpi_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
220ACPI_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
233acpi_status acpi_unload_table(acpi_table_type table_type) 233acpi_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
266ACPI_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
287acpi_status 288acpi_status
288acpi_get_table_header(acpi_table_type table_type, 289acpi_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
331ACPI_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
355acpi_status 356acpi_status
356acpi_get_table(acpi_table_type table_type, 357acpi_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
423EXPORT_SYMBOL(acpi_get_table); 424ACPI_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
373EXPORT_SYMBOL(acpi_get_firmware_table); 371ACPI_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
392acpi_status acpi_find_root_pointer(u32 flags, struct acpi_pointer *rsdp_address) 387acpi_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
409ACPI_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
427static u8 *acpi_tb_scan_memory_for_rsdp(u8 * start_address, u32 length) 423static 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
211EXPORT_SYMBOL(acpi_ut_debug_print); 208ACPI_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
232void ACPI_INTERNAL_VAR_XFACE 228void ACPI_INTERNAL_VAR_XFACE
233acpi_ut_debug_print_raw(u32 requested_debug_level, 229acpi_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
249EXPORT_SYMBOL(acpi_ut_debug_print_raw); 245ACPI_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
267void 262void
268acpi_ut_trace(u32 line_number, 263acpi_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
280EXPORT_SYMBOL(acpi_ut_trace); 275ACPI_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
299void 293void
300acpi_ut_trace_ptr(u32 line_number, 294acpi_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
405EXPORT_SYMBOL(acpi_ut_exit); 399ACPI_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
424void 417void
425acpi_ut_status_exit(u32 line_number, 418acpi_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
447EXPORT_SYMBOL(acpi_ut_status_exit); 440ACPI_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
466void 458void
467acpi_ut_value_exit(u32 line_number, 459acpi_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
480EXPORT_SYMBOL(acpi_ut_value_exit); 472ACPI_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
499void 490void
500acpi_ut_ptr_exit(u32 line_number, 491acpi_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 */
146u32 acpi_dbg_level = ACPI_DEBUG_DEFAULT; 145u32 acpi_dbg_level = ACPI_DEBUG_DEFAULT;
147EXPORT_SYMBOL(acpi_dbg_level);
148 146
149/* Debug switch - layer (component) mask */ 147/* Debug switch - layer (component) mask */
150 148
151u32 acpi_dbg_layer = ACPI_COMPONENT_DEFAULT | ACPI_ALL_DRIVERS; 149u32 acpi_dbg_layer = ACPI_COMPONENT_DEFAULT | ACPI_ALL_DRIVERS;
152EXPORT_SYMBOL(acpi_dbg_layer);
153u32 acpi_gbl_nesting_level = 0; 150u32 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
872ACPI_EXPORT_SYMBOL(acpi_dbg_level)
873ACPI_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)
192acpi_status acpi_ut_acquire_mutex(acpi_mutex_handle mutex_id) 192acpi_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)
275acpi_status acpi_ut_release_mutex(acpi_mutex_handle mutex_id) 275acpi_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
110ACPI_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
125acpi_status acpi_enable_subsystem(u32 flags) 124acpi_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
231ACPI_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
245acpi_status acpi_initialize_objects(u32 flags) 245acpi_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
308ACPI_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
320acpi_status acpi_terminate(void) 321acpi_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
352ACPI_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
366acpi_status acpi_subsystem_status(void) 368acpi_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
378ACPI_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
394acpi_status acpi_get_system_info(struct acpi_buffer * out_buffer) 397acpi_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
459EXPORT_SYMBOL(acpi_get_system_info); 462ACPI_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
476acpi_status 478acpi_status
477acpi_install_initialization_handler(acpi_init_handler handler, u32 function) 479acpi_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
494ACPI_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
506acpi_status acpi_purge_cached_objects(void) 508acpi_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
519ACPI_EXPORT_SYMBOL(acpi_purge_cached_objects)