diff options
author | Len Brown <len.brown@intel.com> | 2010-02-16 03:01:42 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2010-02-16 03:17:40 -0500 |
commit | 0e026445fb36852d3102cb8bb24868765fe5816a (patch) | |
tree | 79bd261ac1117525f3b37d6d82a2dfd2a57d39f7 /drivers/acpi/utils.c | |
parent | 724e6d3fe8003c3f60bf404bf22e4e331327c596 (diff) |
ACPI: delete unused acpi_evaluate_string()
Roel found a logic issue in the #if 0 acpi_evaluate_string():
- || (element->type != ACPI_TYPE_BUFFER)
+ && (element->type != ACPI_TYPE_BUFFER)
delete the dead code.
pointed-out-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/utils.c')
-rw-r--r-- | drivers/acpi/utils.c | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c index 811fec10462b..592dffb43694 100644 --- a/drivers/acpi/utils.c +++ b/drivers/acpi/utils.c | |||
@@ -289,51 +289,6 @@ acpi_evaluate_integer(acpi_handle handle, | |||
289 | 289 | ||
290 | EXPORT_SYMBOL(acpi_evaluate_integer); | 290 | EXPORT_SYMBOL(acpi_evaluate_integer); |
291 | 291 | ||
292 | #if 0 | ||
293 | acpi_status | ||
294 | acpi_evaluate_string(acpi_handle handle, | ||
295 | acpi_string pathname, | ||
296 | acpi_object_list * arguments, acpi_string * data) | ||
297 | { | ||
298 | acpi_status status = AE_OK; | ||
299 | acpi_object *element = NULL; | ||
300 | acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; | ||
301 | |||
302 | |||
303 | if (!data) | ||
304 | return AE_BAD_PARAMETER; | ||
305 | |||
306 | status = acpi_evaluate_object(handle, pathname, arguments, &buffer); | ||
307 | if (ACPI_FAILURE(status)) { | ||
308 | acpi_util_eval_error(handle, pathname, status); | ||
309 | return status; | ||
310 | } | ||
311 | |||
312 | element = (acpi_object *) buffer.pointer; | ||
313 | |||
314 | if ((element->type != ACPI_TYPE_STRING) | ||
315 | || (element->type != ACPI_TYPE_BUFFER) | ||
316 | || !element->string.length) { | ||
317 | acpi_util_eval_error(handle, pathname, AE_BAD_DATA); | ||
318 | return AE_BAD_DATA; | ||
319 | } | ||
320 | |||
321 | *data = kzalloc(element->string.length + 1, GFP_KERNEL); | ||
322 | if (!data) { | ||
323 | printk(KERN_ERR PREFIX "Memory allocation\n"); | ||
324 | return -ENOMEM; | ||
325 | } | ||
326 | |||
327 | memcpy(*data, element->string.pointer, element->string.length); | ||
328 | |||
329 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Return value [%s]\n", *data)); | ||
330 | |||
331 | kfree(buffer.pointer); | ||
332 | |||
333 | return AE_OK; | ||
334 | } | ||
335 | #endif | ||
336 | |||
337 | acpi_status | 292 | acpi_status |
338 | acpi_evaluate_reference(acpi_handle handle, | 293 | acpi_evaluate_reference(acpi_handle handle, |
339 | acpi_string pathname, | 294 | acpi_string pathname, |