aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/parser/psutils.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/parser/psutils.c')
-rw-r--r--drivers/acpi/parser/psutils.c37
1 files changed, 6 insertions, 31 deletions
diff --git a/drivers/acpi/parser/psutils.c b/drivers/acpi/parser/psutils.c
index a10f88715d43..4221b41ae1a6 100644
--- a/drivers/acpi/parser/psutils.c
+++ b/drivers/acpi/parser/psutils.c
@@ -154,12 +154,14 @@ acpi_ps_alloc_op (
154 if (flags == ACPI_PARSEOP_GENERIC) { 154 if (flags == ACPI_PARSEOP_GENERIC) {
155 /* The generic op (default) is by far the most common (16 to 1) */ 155 /* The generic op (default) is by far the most common (16 to 1) */
156 156
157 op = acpi_ut_acquire_from_cache (ACPI_MEM_LIST_PSNODE); 157 op = acpi_os_acquire_object (acpi_gbl_ps_node_cache);
158 memset(op, 0, sizeof(struct acpi_parse_obj_common));
158 } 159 }
159 else { 160 else {
160 /* Extended parseop */ 161 /* Extended parseop */
161 162
162 op = acpi_ut_acquire_from_cache (ACPI_MEM_LIST_PSNODE_EXT); 163 op = acpi_os_acquire_object (acpi_gbl_ps_node_ext_cache);
164 memset(op, 0, sizeof(struct acpi_parse_obj_named));
163 } 165 }
164 166
165 /* Initialize the Op */ 167 /* Initialize the Op */
@@ -198,41 +200,14 @@ acpi_ps_free_op (
198 } 200 }
199 201
200 if (op->common.flags & ACPI_PARSEOP_GENERIC) { 202 if (op->common.flags & ACPI_PARSEOP_GENERIC) {
201 acpi_ut_release_to_cache (ACPI_MEM_LIST_PSNODE, op); 203 (void) acpi_os_release_object (acpi_gbl_ps_node_cache, op);
202 } 204 }
203 else { 205 else {
204 acpi_ut_release_to_cache (ACPI_MEM_LIST_PSNODE_EXT, op); 206 (void) acpi_os_release_object (acpi_gbl_ps_node_ext_cache, op);
205 } 207 }
206} 208}
207 209
208 210
209#ifdef ACPI_ENABLE_OBJECT_CACHE
210/*******************************************************************************
211 *
212 * FUNCTION: acpi_ps_delete_parse_cache
213 *
214 * PARAMETERS: None
215 *
216 * RETURN: None
217 *
218 * DESCRIPTION: Free all objects that are on the parse cache list.
219 *
220 ******************************************************************************/
221
222void
223acpi_ps_delete_parse_cache (
224 void)
225{
226 ACPI_FUNCTION_TRACE ("ps_delete_parse_cache");
227
228
229 acpi_ut_delete_generic_cache (ACPI_MEM_LIST_PSNODE);
230 acpi_ut_delete_generic_cache (ACPI_MEM_LIST_PSNODE_EXT);
231 return_VOID;
232}
233#endif
234
235
236/******************************************************************************* 211/*******************************************************************************
237 * 212 *
238 * FUNCTION: Utility functions 213 * FUNCTION: Utility functions