aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/psutils.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/acpica/psutils.c')
-rw-r--r--drivers/acpi/acpica/psutils.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/acpi/acpica/psutils.c b/drivers/acpi/acpica/psutils.c
index 02642760cb93..cd59dfe6a47d 100644
--- a/drivers/acpi/acpica/psutils.c
+++ b/drivers/acpi/acpica/psutils.c
@@ -94,9 +94,11 @@ void acpi_ps_init_op(union acpi_parse_object *op, u16 opcode)
94 op->common.descriptor_type = ACPI_DESC_TYPE_PARSER; 94 op->common.descriptor_type = ACPI_DESC_TYPE_PARSER;
95 op->common.aml_opcode = opcode; 95 op->common.aml_opcode = opcode;
96 96
97 ACPI_DISASM_ONLY_MEMBERS(strncpy(op->common.aml_op_name, 97 ACPI_DISASM_ONLY_MEMBERS(acpi_ut_safe_strncpy(op->common.aml_op_name,
98 (acpi_ps_get_opcode_info(opcode))-> 98 (acpi_ps_get_opcode_info
99 name, sizeof(op->common.aml_op_name))); 99 (opcode))->name,
100 sizeof(op->common.
101 aml_op_name)));
100} 102}
101 103
102/******************************************************************************* 104/*******************************************************************************
@@ -158,10 +160,10 @@ union acpi_parse_object *acpi_ps_alloc_op(u16 opcode, u8 *aml)
158 if (opcode == AML_SCOPE_OP) { 160 if (opcode == AML_SCOPE_OP) {
159 acpi_gbl_current_scope = op; 161 acpi_gbl_current_scope = op;
160 } 162 }
161 }
162 163
163 if (gbl_capture_comments) { 164 if (acpi_gbl_capture_comments) {
164 ASL_CV_TRANSFER_COMMENTS(op); 165 ASL_CV_TRANSFER_COMMENTS(op);
166 }
165 } 167 }
166 168
167 return (op); 169 return (op);