diff options
author | Bob Moore <robert.moore@intel.com> | 2007-04-03 19:59:37 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2007-06-02 00:20:29 -0400 |
commit | 6287ee32952b502c23d54f12895c3895ddbe5013 (patch) | |
tree | 2b7c0baaeda3687793d46b3836ec236c1bea5ed0 /drivers/acpi/utilities/utobject.c | |
parent | 8ff6f48d99a0351bcc9ceab422042ef9d3bad9aa (diff) |
ACPICA: Support for external package objects as method arguments
Implemented support to allow Package objects to be passed as
method arguments to the acpi_evaluate_object interface. Previously,
this would return an AE_NOT_IMPLEMENTED exception.
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/utilities/utobject.c')
-rw-r--r-- | drivers/acpi/utilities/utobject.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/drivers/acpi/utilities/utobject.c b/drivers/acpi/utilities/utobject.c index 4696124759e1..db0b9bac7945 100644 --- a/drivers/acpi/utilities/utobject.c +++ b/drivers/acpi/utilities/utobject.c | |||
@@ -146,6 +146,48 @@ union acpi_operand_object *acpi_ut_create_internal_object_dbg(char *module_name, | |||
146 | 146 | ||
147 | /******************************************************************************* | 147 | /******************************************************************************* |
148 | * | 148 | * |
149 | * FUNCTION: acpi_ut_create_package_object | ||
150 | * | ||
151 | * PARAMETERS: Count - Number of package elements | ||
152 | * | ||
153 | * RETURN: Pointer to a new Package object, null on failure | ||
154 | * | ||
155 | * DESCRIPTION: Create a fully initialized package object | ||
156 | * | ||
157 | ******************************************************************************/ | ||
158 | |||
159 | union acpi_operand_object *acpi_ut_create_package_object(u32 count) | ||
160 | { | ||
161 | union acpi_operand_object *package_desc; | ||
162 | union acpi_operand_object **package_elements; | ||
163 | |||
164 | ACPI_FUNCTION_TRACE_U32(ut_create_package_object, count); | ||
165 | |||
166 | /* Create a new Package object */ | ||
167 | |||
168 | package_desc = acpi_ut_create_internal_object(ACPI_TYPE_PACKAGE); | ||
169 | if (!package_desc) { | ||
170 | return_PTR(NULL); | ||
171 | } | ||
172 | |||
173 | /* | ||
174 | * Create the element array. Count+1 allows the array to be null | ||
175 | * terminated. | ||
176 | */ | ||
177 | package_elements = ACPI_ALLOCATE_ZEROED((acpi_size) | ||
178 | (count + 1) * sizeof(void *)); | ||
179 | if (!package_elements) { | ||
180 | ACPI_FREE(package_desc); | ||
181 | return_PTR(NULL); | ||
182 | } | ||
183 | |||
184 | package_desc->package.count = count; | ||
185 | package_desc->package.elements = package_elements; | ||
186 | return_PTR(package_desc); | ||
187 | } | ||
188 | |||
189 | /******************************************************************************* | ||
190 | * | ||
149 | * FUNCTION: acpi_ut_create_buffer_object | 191 | * FUNCTION: acpi_ut_create_buffer_object |
150 | * | 192 | * |
151 | * PARAMETERS: buffer_size - Size of buffer to be created | 193 | * PARAMETERS: buffer_size - Size of buffer to be created |