summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/utils.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-12-04 09:07:19 +0100
committerIngo Molnar <mingo@elte.hu>2008-12-04 09:07:19 +0100
commitb8307db2477f9c551e54e0c7b643ea349a3349cd (patch)
tree88654f8bd73857bbd40f75013ce41d8882d16ce6 /drivers/acpi/utils.c
parentf0461d0146ee30927bc7efa2ae24ea8c6693b725 (diff)
parent061e41fdb5047b1fb161e89664057835935ca1d2 (diff)
downloadlinux-b8307db2477f9c551e54e0c7b643ea349a3349cd.tar.gz
linux-b8307db2477f9c551e54e0c7b643ea349a3349cd.tar.bz2
linux-b8307db2477f9c551e54e0c7b643ea349a3349cd.zip
Merge commit 'v2.6.28-rc7' into tracing/core
Diffstat (limited to 'drivers/acpi/utils.c')
-rw-r--r--drivers/acpi/utils.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c
index e827be36ee8d..f844941089bb 100644
--- a/drivers/acpi/utils.c
+++ b/drivers/acpi/utils.c
@@ -259,34 +259,26 @@ acpi_evaluate_integer(acpi_handle handle,
struct acpi_object_list *arguments, unsigned long long *data)
{
acpi_status status = AE_OK;
- union acpi_object *element;
+ union acpi_object element;
struct acpi_buffer buffer = { 0, NULL };
-
if (!data)
return AE_BAD_PARAMETER;
- element = kzalloc(sizeof(union acpi_object), irqs_disabled() ? GFP_ATOMIC: GFP_KERNEL);
- if (!element)
- return AE_NO_MEMORY;
-
buffer.length = sizeof(union acpi_object);
- buffer.pointer = element;
+ buffer.pointer = &element;
status = acpi_evaluate_object(handle, pathname, arguments, &buffer);
if (ACPI_FAILURE(status)) {
acpi_util_eval_error(handle, pathname, status);
- kfree(element);
return status;
}
- if (element->type != ACPI_TYPE_INTEGER) {
+ if (element.type != ACPI_TYPE_INTEGER) {
acpi_util_eval_error(handle, pathname, AE_BAD_DATA);
- kfree(element);
return AE_BAD_DATA;
}
- *data = element->integer.value;
- kfree(element);
+ *data = element.integer.value;
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Return value [%llu]\n", *data));