aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/acpi/acpica/acutils.h2
-rw-r--r--drivers/acpi/acpica/utobject.c29
2 files changed, 31 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/acutils.h b/drivers/acpi/acpica/acutils.h
index f920d89b3b15..3a451a21a3f9 100644
--- a/drivers/acpi/acpica/acutils.h
+++ b/drivers/acpi/acpica/acutils.h
@@ -386,6 +386,8 @@ u8 acpi_ut_valid_internal_object(void *object);
386 386
387union acpi_operand_object *acpi_ut_create_package_object(u32 count); 387union acpi_operand_object *acpi_ut_create_package_object(u32 count);
388 388
389union acpi_operand_object *acpi_ut_create_integer_object(u64 value);
390
389union acpi_operand_object *acpi_ut_create_buffer_object(acpi_size buffer_size); 391union acpi_operand_object *acpi_ut_create_buffer_object(acpi_size buffer_size);
390 392
391union acpi_operand_object *acpi_ut_create_string_object(acpi_size string_size); 393union acpi_operand_object *acpi_ut_create_string_object(acpi_size string_size);
diff --git a/drivers/acpi/acpica/utobject.c b/drivers/acpi/acpica/utobject.c
index 0207b625274a..42e658b543f1 100644
--- a/drivers/acpi/acpica/utobject.c
+++ b/drivers/acpi/acpica/utobject.c
@@ -190,6 +190,35 @@ union acpi_operand_object *acpi_ut_create_package_object(u32 count)
190 190
191/******************************************************************************* 191/*******************************************************************************
192 * 192 *
193 * FUNCTION: acpi_ut_create_integer_object
194 *
195 * PARAMETERS: initial_value - Initial value for the integer
196 *
197 * RETURN: Pointer to a new Integer object, null on failure
198 *
199 * DESCRIPTION: Create an initialized integer object
200 *
201 ******************************************************************************/
202
203union acpi_operand_object *acpi_ut_create_integer_object(u64 initial_value)
204{
205 union acpi_operand_object *integer_desc;
206
207 ACPI_FUNCTION_TRACE(ut_create_integer_object);
208
209 /* Create and initialize a new integer object */
210
211 integer_desc = acpi_ut_create_internal_object(ACPI_TYPE_INTEGER);
212 if (!integer_desc) {
213 return_PTR(NULL);
214 }
215
216 integer_desc->integer.value = initial_value;
217 return_PTR(integer_desc);
218}
219
220/*******************************************************************************
221 *
193 * FUNCTION: acpi_ut_create_buffer_object 222 * FUNCTION: acpi_ut_create_buffer_object
194 * 223 *
195 * PARAMETERS: buffer_size - Size of buffer to be created 224 * PARAMETERS: buffer_size - Size of buffer to be created