ACPICA: acpiexec: initialize all simple types and field units from user input
[linux-2.6-block.git] / drivers / acpi / acpica / dsfield.c
index 9151f00dfbdcc5266235a9b927f63f6fb49a875a..faa38a22263ad9438e44c3233924f47a2070fa5e 100644 (file)
@@ -263,7 +263,6 @@ acpi_ds_get_field_names(struct acpi_create_field_info *info,
        union acpi_parse_object *child;
 
 #ifdef ACPI_EXEC_APP
-       u64 value = 0;
        union acpi_operand_object *result_desc;
        union acpi_operand_object *obj_desc;
        char *name_path;
@@ -405,19 +404,17 @@ acpi_ds_get_field_names(struct acpi_create_field_info *info,
                                        name_path =
                                            acpi_ns_get_external_pathname(info->
                                                                          field_node);
-                                       obj_desc =
-                                           acpi_ut_create_integer_object
-                                           (value);
                                        if (ACPI_SUCCESS
                                            (ae_lookup_init_file_entry
-                                            (name_path, &value))) {
+                                            (name_path, &obj_desc))) {
                                                acpi_ex_write_data_to_field
                                                    (obj_desc,
                                                     acpi_ns_get_attached_object
                                                     (info->field_node),
                                                     &result_desc);
+                                               acpi_ut_remove_reference
+                                                   (obj_desc);
                                        }
-                                       acpi_ut_remove_reference(obj_desc);
                                        ACPI_FREE(name_path);
 #endif
                                }