diff options
author | Bob Moore <robert.moore@intel.com> | 2009-03-06 10:05:18 +0800 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-03-27 12:11:02 -0400 |
commit | d4913dc6d0c680aa106d1d80b5ad2a9325367afd (patch) | |
tree | 4ce6e658b21a2bc69e7c57caa6f7dfa1ff8ec53b /drivers/acpi/acpica/nsutils.c | |
parent | 768aaaf196e8a40f5cfc792d9d365795cc52ed13 (diff) |
ACPICA: Formatting update - no functional changes
Split long lines, update comments.
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/nsutils.c')
-rw-r--r-- | drivers/acpi/acpica/nsutils.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/drivers/acpi/acpica/nsutils.c b/drivers/acpi/acpica/nsutils.c index d30b0e65ab3c..78277ed08339 100644 --- a/drivers/acpi/acpica/nsutils.c +++ b/drivers/acpi/acpica/nsutils.c @@ -325,9 +325,8 @@ void acpi_ns_get_internal_name_length(struct acpi_namestring_info *info) next_external_char++; } } else { - /* - * Handle Carat prefixes - */ + /* Handle Carat prefixes */ + while (*next_external_char == '^') { info->num_carats++; next_external_char++; @@ -552,9 +551,8 @@ acpi_ns_externalize_name(u32 internal_name_length, return_ACPI_STATUS(AE_BAD_PARAMETER); } - /* - * Check for a prefix (one '\' | one or more '^'). - */ + /* Check for a prefix (one '\' | one or more '^') */ + switch (internal_name[0]) { case '\\': prefix_length = 1; @@ -580,7 +578,7 @@ acpi_ns_externalize_name(u32 internal_name_length, } /* - * Check for object names. Note that there could be 0-255 of these + * Check for object names. Note that there could be 0-255 of these * 4-byte elements. */ if (prefix_length < internal_name_length) { @@ -637,9 +635,8 @@ acpi_ns_externalize_name(u32 internal_name_length, return_ACPI_STATUS(AE_BAD_PATHNAME); } - /* - * Build converted_name - */ + /* Build the converted_name */ + *converted_name = ACPI_ALLOCATE_ZEROED(required_length); if (!(*converted_name)) { return_ACPI_STATUS(AE_NO_MEMORY); @@ -685,6 +682,9 @@ acpi_ns_externalize_name(u32 internal_name_length, * and keep all pointers within this subsystem - however this introduces * more (and perhaps unnecessary) overhead. * + * The current implemenation is basically a placeholder until such time comes + * that it is needed. + * ******************************************************************************/ struct acpi_namespace_node *acpi_ns_map_handle_to_node(acpi_handle handle) @@ -692,9 +692,8 @@ struct acpi_namespace_node *acpi_ns_map_handle_to_node(acpi_handle handle) ACPI_FUNCTION_ENTRY(); - /* - * Simple implementation - */ + /* Parameter validation */ + if ((!handle) || (handle == ACPI_ROOT_OBJECT)) { return (acpi_gbl_root_node); } |