Merge branch 'for-linus' of ssh://master.kernel.org/pub/scm/linux/kernel/git/ieee1394...
[pandora-kernel.git] / drivers / acpi / utilities / utalloc.c
index 7940fc1..55a7648 100644 (file)
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -42,6 +42,7 @@
  */
 
 #include <acpi/acpi.h>
+#include <acpi/acdebug.h>
 
 #define _COMPONENT          ACPI_UTILITIES
 ACPI_MODULE_NAME("utalloc")
@@ -142,6 +143,14 @@ acpi_status acpi_ut_create_caches(void)
 
 acpi_status acpi_ut_delete_caches(void)
 {
+#ifdef ACPI_DBG_TRACK_ALLOCATIONS
+       char buffer[7];
+
+       if (acpi_gbl_display_final_mem_stats) {
+               ACPI_STRCPY(buffer, "MEMORY");
+               acpi_db_display_statistics(buffer);
+       }
+#endif
 
        (void)acpi_os_delete_cache(acpi_gbl_namespace_cache);
        acpi_gbl_namespace_cache = NULL;
@@ -166,10 +175,10 @@ acpi_status acpi_ut_delete_caches(void)
 
        /* Free memory lists */
 
-       acpi_os_free(acpi_gbl_global_list);
+       ACPI_FREE(acpi_gbl_global_list);
        acpi_gbl_global_list = NULL;
 
-       acpi_os_free(acpi_gbl_ns_node_list);
+       ACPI_FREE(acpi_gbl_ns_node_list);
        acpi_gbl_ns_node_list = NULL;
 #endif
 
@@ -285,6 +294,7 @@ acpi_ut_initialize_buffer(struct acpi_buffer * buffer,
        return (status);
 }
 
+#ifdef NOT_USED_BY_LINUX
 /*******************************************************************************
  *
  * FUNCTION:    acpi_ut_allocate
@@ -360,3 +370,4 @@ void *acpi_ut_allocate_zeroed(acpi_size size,
 
        return (allocation);
 }
+#endif