diff options
Diffstat (limited to 'drivers/acpi/executer/exnames.c')
-rw-r--r-- | drivers/acpi/executer/exnames.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/acpi/executer/exnames.c b/drivers/acpi/executer/exnames.c index 054fe5e1a314..f9bc81c1b78d 100644 --- a/drivers/acpi/executer/exnames.c +++ b/drivers/acpi/executer/exnames.c | |||
@@ -85,6 +85,7 @@ static char *acpi_ex_allocate_name_string(u32 prefix_count, u32 num_name_segs) | |||
85 | * This may actually be somewhat longer than needed. | 85 | * This may actually be somewhat longer than needed. |
86 | */ | 86 | */ |
87 | if (prefix_count == ACPI_UINT32_MAX) { | 87 | if (prefix_count == ACPI_UINT32_MAX) { |
88 | |||
88 | /* Special case for root */ | 89 | /* Special case for root */ |
89 | 90 | ||
90 | size_needed = 1 + (ACPI_NAME_SIZE * num_name_segs) + 2 + 1; | 91 | size_needed = 1 + (ACPI_NAME_SIZE * num_name_segs) + 2 + 1; |
@@ -119,11 +120,13 @@ static char *acpi_ex_allocate_name_string(u32 prefix_count, u32 num_name_segs) | |||
119 | /* Set up Dual or Multi prefixes if needed */ | 120 | /* Set up Dual or Multi prefixes if needed */ |
120 | 121 | ||
121 | if (num_name_segs > 2) { | 122 | if (num_name_segs > 2) { |
123 | |||
122 | /* Set up multi prefixes */ | 124 | /* Set up multi prefixes */ |
123 | 125 | ||
124 | *temp_ptr++ = AML_MULTI_NAME_PREFIX_OP; | 126 | *temp_ptr++ = AML_MULTI_NAME_PREFIX_OP; |
125 | *temp_ptr++ = (char)num_name_segs; | 127 | *temp_ptr++ = (char)num_name_segs; |
126 | } else if (2 == num_name_segs) { | 128 | } else if (2 == num_name_segs) { |
129 | |||
127 | /* Set up dual prefixes */ | 130 | /* Set up dual prefixes */ |
128 | 131 | ||
129 | *temp_ptr++ = AML_DUAL_NAME_PREFIX; | 132 | *temp_ptr++ = AML_DUAL_NAME_PREFIX; |
@@ -184,6 +187,7 @@ static acpi_status acpi_ex_name_segment(u8 ** in_aml_address, char *name_string) | |||
184 | /* Valid name segment */ | 187 | /* Valid name segment */ |
185 | 188 | ||
186 | if (index == 4) { | 189 | if (index == 4) { |
190 | |||
187 | /* Found 4 valid characters */ | 191 | /* Found 4 valid characters */ |
188 | 192 | ||
189 | char_buf[4] = '\0'; | 193 | char_buf[4] = '\0'; |
@@ -254,6 +258,7 @@ acpi_ex_get_name_string(acpi_object_type data_type, | |||
254 | if (ACPI_TYPE_LOCAL_REGION_FIELD == data_type || | 258 | if (ACPI_TYPE_LOCAL_REGION_FIELD == data_type || |
255 | ACPI_TYPE_LOCAL_BANK_FIELD == data_type || | 259 | ACPI_TYPE_LOCAL_BANK_FIELD == data_type || |
256 | ACPI_TYPE_LOCAL_INDEX_FIELD == data_type) { | 260 | ACPI_TYPE_LOCAL_INDEX_FIELD == data_type) { |
261 | |||
257 | /* Disallow prefixes for types associated with field_unit names */ | 262 | /* Disallow prefixes for types associated with field_unit names */ |
258 | 263 | ||
259 | name_string = acpi_ex_allocate_name_string(0, 1); | 264 | name_string = acpi_ex_allocate_name_string(0, 1); |
@@ -410,6 +415,7 @@ acpi_ex_get_name_string(acpi_object_type data_type, | |||
410 | } | 415 | } |
411 | 416 | ||
412 | if (AE_CTRL_PENDING == status && has_prefix) { | 417 | if (AE_CTRL_PENDING == status && has_prefix) { |
418 | |||
413 | /* Ran out of segments after processing a prefix */ | 419 | /* Ran out of segments after processing a prefix */ |
414 | 420 | ||
415 | ACPI_ERROR((AE_INFO, "Malformed Name at %p", name_string)); | 421 | ACPI_ERROR((AE_INFO, "Malformed Name at %p", name_string)); |