diff options
Diffstat (limited to 'drivers/acpi/namespace/nsutils.c')
-rw-r--r-- | drivers/acpi/namespace/nsutils.c | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/drivers/acpi/namespace/nsutils.c b/drivers/acpi/namespace/nsutils.c index 64c039843ed2..b0817e1127b1 100644 --- a/drivers/acpi/namespace/nsutils.c +++ b/drivers/acpi/namespace/nsutils.c | |||
@@ -73,9 +73,9 @@ acpi_name acpi_ns_find_parent_name(struct acpi_namespace_node *node_to_search); | |||
73 | ******************************************************************************/ | 73 | ******************************************************************************/ |
74 | 74 | ||
75 | void | 75 | void |
76 | acpi_ns_report_error(char *module_name, | 76 | acpi_ns_report_error(const char *module_name, |
77 | u32 line_number, | 77 | u32 line_number, |
78 | char *internal_name, acpi_status lookup_status) | 78 | const char *internal_name, acpi_status lookup_status) |
79 | { | 79 | { |
80 | acpi_status status; | 80 | acpi_status status; |
81 | u32 bad_name; | 81 | u32 bad_name; |
@@ -130,11 +130,11 @@ acpi_ns_report_error(char *module_name, | |||
130 | ******************************************************************************/ | 130 | ******************************************************************************/ |
131 | 131 | ||
132 | void | 132 | void |
133 | acpi_ns_report_method_error(char *module_name, | 133 | acpi_ns_report_method_error(const char *module_name, |
134 | u32 line_number, | 134 | u32 line_number, |
135 | char *message, | 135 | const char *message, |
136 | struct acpi_namespace_node *prefix_node, | 136 | struct acpi_namespace_node *prefix_node, |
137 | char *path, acpi_status method_status) | 137 | const char *path, acpi_status method_status) |
138 | { | 138 | { |
139 | acpi_status status; | 139 | acpi_status status; |
140 | struct acpi_namespace_node *node = prefix_node; | 140 | struct acpi_namespace_node *node = prefix_node; |
@@ -167,7 +167,8 @@ acpi_ns_report_method_error(char *module_name, | |||
167 | ******************************************************************************/ | 167 | ******************************************************************************/ |
168 | 168 | ||
169 | void | 169 | void |
170 | acpi_ns_print_node_pathname(struct acpi_namespace_node *node, char *message) | 170 | acpi_ns_print_node_pathname(struct acpi_namespace_node *node, |
171 | const char *message) | ||
171 | { | 172 | { |
172 | struct acpi_buffer buffer; | 173 | struct acpi_buffer buffer; |
173 | acpi_status status; | 174 | acpi_status status; |
@@ -296,7 +297,7 @@ u32 acpi_ns_local(acpi_object_type type) | |||
296 | 297 | ||
297 | void acpi_ns_get_internal_name_length(struct acpi_namestring_info *info) | 298 | void acpi_ns_get_internal_name_length(struct acpi_namestring_info *info) |
298 | { | 299 | { |
299 | char *next_external_char; | 300 | const char *next_external_char; |
300 | u32 i; | 301 | u32 i; |
301 | 302 | ||
302 | ACPI_FUNCTION_ENTRY(); | 303 | ACPI_FUNCTION_ENTRY(); |
@@ -363,9 +364,9 @@ acpi_status acpi_ns_build_internal_name(struct acpi_namestring_info *info) | |||
363 | { | 364 | { |
364 | u32 num_segments = info->num_segments; | 365 | u32 num_segments = info->num_segments; |
365 | char *internal_name = info->internal_name; | 366 | char *internal_name = info->internal_name; |
366 | char *external_name = info->next_external_char; | 367 | const char *external_name = info->next_external_char; |
367 | char *result = NULL; | 368 | char *result = NULL; |
368 | acpi_native_uint i; | 369 | u32 i; |
369 | 370 | ||
370 | ACPI_FUNCTION_TRACE(ns_build_internal_name); | 371 | ACPI_FUNCTION_TRACE(ns_build_internal_name); |
371 | 372 | ||
@@ -400,12 +401,11 @@ acpi_status acpi_ns_build_internal_name(struct acpi_namestring_info *info) | |||
400 | result = &internal_name[i]; | 401 | result = &internal_name[i]; |
401 | } else if (num_segments == 2) { | 402 | } else if (num_segments == 2) { |
402 | internal_name[i] = AML_DUAL_NAME_PREFIX; | 403 | internal_name[i] = AML_DUAL_NAME_PREFIX; |
403 | result = &internal_name[(acpi_native_uint) (i + 1)]; | 404 | result = &internal_name[(acpi_size) i + 1]; |
404 | } else { | 405 | } else { |
405 | internal_name[i] = AML_MULTI_NAME_PREFIX_OP; | 406 | internal_name[i] = AML_MULTI_NAME_PREFIX_OP; |
406 | internal_name[(acpi_native_uint) (i + 1)] = | 407 | internal_name[(acpi_size) i + 1] = (char)num_segments; |
407 | (char)num_segments; | 408 | result = &internal_name[(acpi_size) i + 2]; |
408 | result = &internal_name[(acpi_native_uint) (i + 2)]; | ||
409 | } | 409 | } |
410 | } | 410 | } |
411 | 411 | ||
@@ -472,7 +472,8 @@ acpi_status acpi_ns_build_internal_name(struct acpi_namestring_info *info) | |||
472 | * | 472 | * |
473 | *******************************************************************************/ | 473 | *******************************************************************************/ |
474 | 474 | ||
475 | acpi_status acpi_ns_internalize_name(char *external_name, char **converted_name) | 475 | acpi_status |
476 | acpi_ns_internalize_name(const char *external_name, char **converted_name) | ||
476 | { | 477 | { |
477 | char *internal_name; | 478 | char *internal_name; |
478 | struct acpi_namestring_info info; | 479 | struct acpi_namestring_info info; |
@@ -528,15 +529,15 @@ acpi_status acpi_ns_internalize_name(char *external_name, char **converted_name) | |||
528 | 529 | ||
529 | acpi_status | 530 | acpi_status |
530 | acpi_ns_externalize_name(u32 internal_name_length, | 531 | acpi_ns_externalize_name(u32 internal_name_length, |
531 | char *internal_name, | 532 | const char *internal_name, |
532 | u32 * converted_name_length, char **converted_name) | 533 | u32 * converted_name_length, char **converted_name) |
533 | { | 534 | { |
534 | acpi_native_uint names_index = 0; | 535 | u32 names_index = 0; |
535 | acpi_native_uint num_segments = 0; | 536 | u32 num_segments = 0; |
536 | acpi_native_uint required_length; | 537 | u32 required_length; |
537 | acpi_native_uint prefix_length = 0; | 538 | u32 prefix_length = 0; |
538 | acpi_native_uint i = 0; | 539 | u32 i = 0; |
539 | acpi_native_uint j = 0; | 540 | u32 j = 0; |
540 | 541 | ||
541 | ACPI_FUNCTION_TRACE(ns_externalize_name); | 542 | ACPI_FUNCTION_TRACE(ns_externalize_name); |
542 | 543 | ||
@@ -582,9 +583,8 @@ acpi_ns_externalize_name(u32 internal_name_length, | |||
582 | /* <count> 4-byte names */ | 583 | /* <count> 4-byte names */ |
583 | 584 | ||
584 | names_index = prefix_length + 2; | 585 | names_index = prefix_length + 2; |
585 | num_segments = (acpi_native_uint) (u8) | 586 | num_segments = (u8) |
586 | internal_name[(acpi_native_uint) | 587 | internal_name[(acpi_size) prefix_length + 1]; |
587 | (prefix_length + 1)]; | ||
588 | break; | 588 | break; |
589 | 589 | ||
590 | case AML_DUAL_NAME_PREFIX: | 590 | case AML_DUAL_NAME_PREFIX: |
@@ -823,7 +823,7 @@ u32 acpi_ns_opens_scope(acpi_object_type type) | |||
823 | 823 | ||
824 | acpi_status | 824 | acpi_status |
825 | acpi_ns_get_node(struct acpi_namespace_node *prefix_node, | 825 | acpi_ns_get_node(struct acpi_namespace_node *prefix_node, |
826 | char *pathname, | 826 | const char *pathname, |
827 | u32 flags, struct acpi_namespace_node **return_node) | 827 | u32 flags, struct acpi_namespace_node **return_node) |
828 | { | 828 | { |
829 | union acpi_generic_state scope_info; | 829 | union acpi_generic_state scope_info; |