forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-04 1543e317f1da31b75942316931e8f491a8920811
kernel/drivers/acpi/acpica/nsutils.c
....@@ -4,7 +4,7 @@
44 * Module Name: nsutils - Utilities for accessing ACPI namespace, accessing
55 * parents and siblings and Scope manipulation
66 *
7
- * Copyright (C) 2000 - 2018, Intel Corp.
7
+ * Copyright (C) 2000 - 2020, Intel Corp.
88 *
99 *****************************************************************************/
1010
....@@ -178,7 +178,7 @@
178178 }
179179 }
180180
181
- info->length = (ACPI_NAME_SIZE * info->num_segments) +
181
+ info->length = (ACPI_NAMESEG_SIZE * info->num_segments) +
182182 4 + info->num_carats;
183183
184184 info->next_external_char = next_external_char;
....@@ -249,7 +249,7 @@
249249 /* Build the name (minus path separators) */
250250
251251 for (; num_segments; num_segments--) {
252
- for (i = 0; i < ACPI_NAME_SIZE; i++) {
252
+ for (i = 0; i < ACPI_NAMESEG_SIZE; i++) {
253253 if (ACPI_IS_PATH_SEPARATOR(*external_name) ||
254254 (*external_name == 0)) {
255255
....@@ -274,7 +274,7 @@
274274 /* Move on the next segment */
275275
276276 external_name++;
277
- result += ACPI_NAME_SIZE;
277
+ result += ACPI_NAMESEG_SIZE;
278278 }
279279
280280 /* Terminate the string */
....@@ -350,7 +350,7 @@
350350 *
351351 * FUNCTION: acpi_ns_externalize_name
352352 *
353
- * PARAMETERS: internal_name_length - Lenth of the internal name below
353
+ * PARAMETERS: internal_name_length - Length of the internal name below
354354 * internal_name - Internal representation of name
355355 * converted_name_length - Where the length is returned
356356 * converted_name - Where the resulting external name
....@@ -489,12 +489,12 @@
489489
490490 /* Copy and validate the 4-char name segment */
491491
492
- ACPI_MOVE_NAME(&(*converted_name)[j],
493
- &internal_name[names_index]);
492
+ ACPI_COPY_NAMESEG(&(*converted_name)[j],
493
+ &internal_name[names_index]);
494494 acpi_ut_repair_name(&(*converted_name)[j]);
495495
496
- j += ACPI_NAME_SIZE;
497
- names_index += ACPI_NAME_SIZE;
496
+ j += ACPI_NAMESEG_SIZE;
497
+ names_index += ACPI_NAMESEG_SIZE;
498498 }
499499 }
500500
....@@ -560,20 +560,8 @@
560560 void acpi_ns_terminate(void)
561561 {
562562 acpi_status status;
563
- union acpi_operand_object *prev;
564
- union acpi_operand_object *next;
565563
566564 ACPI_FUNCTION_TRACE(ns_terminate);
567
-
568
- /* Delete any module-level code blocks */
569
-
570
- next = acpi_gbl_module_code_list;
571
- while (next) {
572
- prev = next;
573
- next = next->method.mutex;
574
- prev->method.mutex = NULL; /* Clear the Mutex (cheated) field */
575
- acpi_ut_remove_reference(prev);
576
- }
577565
578566 /*
579567 * Free the entire namespace -- all nodes and all objects