Pull Kconfig into release branch
[pandora-kernel.git] / drivers / acpi / namespace / nsnames.c
index d5e8dea..97b8332 100644 (file)
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2005, R. Byron Moore
+ * Copyright (C) 2000 - 2006, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
 #define _COMPONENT          ACPI_NAMESPACE
 ACPI_MODULE_NAME("nsnames")
 
-/* Local prototypes */
-static void
-acpi_ns_build_external_path(struct acpi_namespace_node *node,
-                           acpi_size size, char *name_buffer);
-
 /*******************************************************************************
  *
  * FUNCTION:    acpi_ns_build_external_path
@@ -67,15 +62,14 @@ acpi_ns_build_external_path(struct acpi_namespace_node *node,
  * DESCRIPTION: Generate a full pathaname
  *
  ******************************************************************************/
-
-static void
+void
 acpi_ns_build_external_path(struct acpi_namespace_node *node,
                            acpi_size size, char *name_buffer)
 {
        acpi_size index;
        struct acpi_namespace_node *parent_node;
 
-       ACPI_FUNCTION_NAME("ns_build_external_path");
+       ACPI_FUNCTION_ENTRY();
 
        /* Special case for root */
 
@@ -110,9 +104,9 @@ acpi_ns_build_external_path(struct acpi_namespace_node *node,
        name_buffer[index] = AML_ROOT_PREFIX;
 
        if (index != 0) {
-               ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
-                                 "Could not construct pathname; index=%X, size=%X, Path=%s\n",
-                                 (u32) index, (u32) size, &name_buffer[size]));
+               ACPI_ERROR((AE_INFO,
+                           "Could not construct pathname; index=%X, size=%X, Path=%s",
+                           (u32) index, (u32) size, &name_buffer[size]));
        }
 
        return;
@@ -138,7 +132,7 @@ char *acpi_ns_get_external_pathname(struct acpi_namespace_node *node)
        char *name_buffer;
        acpi_size size;
 
-       ACPI_FUNCTION_TRACE_PTR("ns_get_external_pathname", node);
+       ACPI_FUNCTION_TRACE_PTR(ns_get_external_pathname, node);
 
        /* Calculate required buffer size based on depth below root */
 
@@ -146,9 +140,9 @@ char *acpi_ns_get_external_pathname(struct acpi_namespace_node *node)
 
        /* Allocate a buffer to be returned to caller */
 
-       name_buffer = ACPI_MEM_CALLOCATE(size);
+       name_buffer = ACPI_ALLOCATE_ZEROED(size);
        if (!name_buffer) {
-               ACPI_REPORT_ERROR(("ns_get_table_pathname: allocation failure\n"));
+               ACPI_ERROR((AE_INFO, "Allocation failure"));
                return_PTR(NULL);
        }
 
@@ -219,7 +213,7 @@ acpi_ns_handle_to_pathname(acpi_handle target_handle,
        struct acpi_namespace_node *node;
        acpi_size required_size;
 
-       ACPI_FUNCTION_TRACE_PTR("ns_handle_to_pathname", target_handle);
+       ACPI_FUNCTION_TRACE_PTR(ns_handle_to_pathname, target_handle);
 
        node = acpi_ns_map_handle_to_node(target_handle);
        if (!node) {
@@ -241,7 +235,7 @@ acpi_ns_handle_to_pathname(acpi_handle target_handle,
 
        acpi_ns_build_external_path(node, required_size, buffer->pointer);
 
-       ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "%s [%X] \n",
+       ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "%s [%X]\n",
                          (char *)buffer->pointer, (u32) required_size));
        return_ACPI_STATUS(AE_OK);
 }