diff options
author | Bob Moore <robert.moore@intel.com> | 2012-10-30 22:24:51 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2012-11-14 18:31:21 -0500 |
commit | 45dcd31547fcd58273423799b12efe0e8371127e (patch) | |
tree | fc89c938a91796caa1ee581f45581a05d806aa16 /drivers/acpi/acpica/nssearch.c | |
parent | 77b67063bb6bce6d475e910d3b886a606d0d91f7 (diff) |
Cleanup of invalid ACPI name handling and repair
Implemented a change/cleanup for the handling of invalid ACPI names.
Names are now validated and repaired only when
1) entering a new name into the namespace and
2) disassembling a named AML opcode. A warning is only displayed in
debug mode or when the interpreter is in "strict" mode, since some
working machines do in fact contain invalid ACPI names.
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/nssearch.c')
-rw-r--r-- | drivers/acpi/acpica/nssearch.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/drivers/acpi/acpica/nssearch.c b/drivers/acpi/acpica/nssearch.c index 456cc859f869..1d2d8ffc1bc5 100644 --- a/drivers/acpi/acpica/nssearch.c +++ b/drivers/acpi/acpica/nssearch.c | |||
@@ -314,22 +314,7 @@ acpi_ns_search_and_enter(u32 target_name, | |||
314 | * this problem, and we want to be able to enable ACPI support for them, | 314 | * this problem, and we want to be able to enable ACPI support for them, |
315 | * even though there are a few bad names. | 315 | * even though there are a few bad names. |
316 | */ | 316 | */ |
317 | if (!acpi_ut_valid_acpi_name(target_name)) { | 317 | acpi_ut_repair_name(ACPI_CAST_PTR(char, &target_name)); |
318 | target_name = | ||
319 | acpi_ut_repair_name(ACPI_CAST_PTR(char, &target_name)); | ||
320 | |||
321 | /* Report warning only if in strict mode or debug mode */ | ||
322 | |||
323 | if (!acpi_gbl_enable_interpreter_slack) { | ||
324 | ACPI_WARNING((AE_INFO, | ||
325 | "Found bad character(s) in name, repaired: [%4.4s]\n", | ||
326 | ACPI_CAST_PTR(char, &target_name))); | ||
327 | } else { | ||
328 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | ||
329 | "Found bad character(s) in name, repaired: [%4.4s]\n", | ||
330 | ACPI_CAST_PTR(char, &target_name))); | ||
331 | } | ||
332 | } | ||
333 | 318 | ||
334 | /* Try to find the name in the namespace level specified by the caller */ | 319 | /* Try to find the name in the namespace level specified by the caller */ |
335 | 320 | ||