Pull acpica into release branch
[pandora-kernel.git] / drivers / acpi / namespace / nsxfname.c
index 6b5f8d4..978213a 100644 (file)
@@ -6,7 +6,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
@@ -42,8 +42,6 @@
  * POSSIBILITY OF SUCH DAMAGES.
  */
 
-#include <linux/module.h>
-
 #include <acpi/acpi.h>
 #include <acpi/acnamesp.h>
 
@@ -114,9 +112,8 @@ acpi_get_handle(acpi_handle parent,
        /*
         *  Find the Node and convert to a handle
         */
-       status =
-           acpi_ns_get_node_by_path(pathname, prefix_node, ACPI_NS_NO_UPSEARCH,
-                                    &node);
+       status = acpi_ns_get_node(prefix_node, pathname, ACPI_NS_NO_UPSEARCH,
+                                 &node);
 
        *ret_handle = NULL;
        if (ACPI_SUCCESS(status)) {
@@ -126,7 +123,7 @@ acpi_get_handle(acpi_handle parent,
        return (status);
 }
 
-EXPORT_SYMBOL(acpi_get_handle);
+ACPI_EXPORT_SYMBOL(acpi_get_handle)
 
 /******************************************************************************
  *
@@ -143,7 +140,6 @@ EXPORT_SYMBOL(acpi_get_handle);
  *              complementary functions.
  *
  ******************************************************************************/
-
 acpi_status
 acpi_get_name(acpi_handle handle, u32 name_type, struct acpi_buffer * buffer)
 {
@@ -162,6 +158,7 @@ acpi_get_name(acpi_handle handle, u32 name_type, struct acpi_buffer * buffer)
        }
 
        if (name_type == ACPI_FULL_PATHNAME) {
+
                /* Get the full pathname (From the namespace root) */
 
                status = acpi_ns_handle_to_pathname(handle, buffer);
@@ -203,7 +200,7 @@ acpi_get_name(acpi_handle handle, u32 name_type, struct acpi_buffer * buffer)
        return (status);
 }
 
-EXPORT_SYMBOL(acpi_get_name);
+ACPI_EXPORT_SYMBOL(acpi_get_name)
 
 /******************************************************************************
  *
@@ -219,7 +216,6 @@ EXPORT_SYMBOL(acpi_get_name);
  *              control methods (Such as in the case of a device.)
  *
  ******************************************************************************/
-
 acpi_status
 acpi_get_object_info(acpi_handle handle, struct acpi_buffer * buffer)
 {
@@ -241,7 +237,7 @@ acpi_get_object_info(acpi_handle handle, struct acpi_buffer * buffer)
                return (status);
        }
 
-       info = ACPI_MEM_CALLOCATE(sizeof(struct acpi_device_info));
+       info = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_device_info));
        if (!info) {
                return (AE_NO_MEMORY);
        }
@@ -300,8 +296,7 @@ acpi_get_object_info(acpi_handle handle, struct acpi_buffer * buffer)
 
                status = acpi_ut_execute_CID(node, &cid_list);
                if (ACPI_SUCCESS(status)) {
-                       size += ((acpi_size) cid_list->count - 1) *
-                           sizeof(struct acpi_compatible_id);
+                       size += cid_list->size;
                        info->valid |= ACPI_VALID_CID;
                }
 
@@ -346,11 +341,11 @@ acpi_get_object_info(acpi_handle handle, struct acpi_buffer * buffer)
        }
 
       cleanup:
-       ACPI_MEM_FREE(info);
+       ACPI_FREE(info);
        if (cid_list) {
-               ACPI_MEM_FREE(cid_list);
+               ACPI_FREE(cid_list);
        }
        return (status);
 }
 
-EXPORT_SYMBOL(acpi_get_object_info);
+ACPI_EXPORT_SYMBOL(acpi_get_object_info)