summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2004-02-24 16:06:02 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-02-24 16:06:02 -0800
commit091704ef34f2e6aed8436877aeb434125b002c18 (patch)
treea23ad9ba8af938d7452443fa1df4ab7477851d4c
parent36fb0cbc2234708af0a2139aaf693528fbd80d2f (diff)
parent6247834ee787a356751731dd83eeb71b7261c534 (diff)
Merge bk://linux-acpi.bkbits.net/linux-acpi-release-2.6.4
into ppc970.osdl.org:/home/torvalds/v2.5/linux
-rw-r--r--drivers/acpi/dispatcher/dsmthdat.c9
-rw-r--r--drivers/acpi/dispatcher/dsobject.c5
-rw-r--r--drivers/acpi/dispatcher/dsopcode.c6
-rw-r--r--drivers/acpi/dispatcher/dsutils.c3
-rw-r--r--drivers/acpi/dispatcher/dswstate.c2
-rw-r--r--drivers/acpi/executer/exconvrt.c35
-rw-r--r--drivers/acpi/executer/exfldio.c4
-rw-r--r--drivers/acpi/executer/exmisc.c8
-rw-r--r--drivers/acpi/executer/exoparg2.c4
-rw-r--r--drivers/acpi/executer/exprep.c2
-rw-r--r--drivers/acpi/executer/exresolv.c6
-rw-r--r--drivers/acpi/executer/exresop.c4
-rw-r--r--drivers/acpi/executer/exstore.c29
-rw-r--r--drivers/acpi/executer/exstoren.c8
-rw-r--r--drivers/acpi/namespace/nsaccess.c2
-rw-r--r--drivers/acpi/parser/psargs.c4
-rw-r--r--drivers/acpi/sleep/proc.c8
-rw-r--r--drivers/acpi/utils.c2
-rw-r--r--include/acpi/acconfig.h2
19 files changed, 92 insertions, 51 deletions
diff --git a/drivers/acpi/dispatcher/dsmthdat.c b/drivers/acpi/dispatcher/dsmthdat.c
index d8bb62179ac8..e1926534b890 100644
--- a/drivers/acpi/dispatcher/dsmthdat.c
+++ b/drivers/acpi/dispatcher/dsmthdat.c
@@ -206,8 +206,7 @@ acpi_ds_method_data_init_args (
* Store the argument in the method/walk descriptor.
* Do not copy the arg in order to implement call by reference
*/
- status = acpi_ds_method_data_set_value (AML_ARG_OP, index, params[index],
- walk_state);
+ status = acpi_ds_method_data_set_value (AML_ARG_OP, index, params[index], walk_state);
if (ACPI_FAILURE (status)) {
return_ACPI_STATUS (status);
}
@@ -465,6 +464,7 @@ acpi_ds_method_data_get_value (
return_ACPI_STATUS (AE_AML_UNINITIALIZED_LOCAL);
default:
+ ACPI_REPORT_ERROR (("Not Arg/Local opcode: %X\n", opcode));
return_ACPI_STATUS (AE_AML_INTERNAL);
}
}
@@ -597,7 +597,10 @@ acpi_ds_store_object_to_local (
/*
* If the reference count on the object is more than one, we must
- * take a copy of the object before we store.
+ * take a copy of the object before we store. A reference count
+ * of exactly 1 means that the object was just created during the
+ * evaluation of an expression, and we can safely use it since it
+ * is not used anywhere else.
*/
new_obj_desc = obj_desc;
if (obj_desc->common.reference_count > 1) {
diff --git a/drivers/acpi/dispatcher/dsobject.c b/drivers/acpi/dispatcher/dsobject.c
index b3f7d41e0ce1..e405639502d5 100644
--- a/drivers/acpi/dispatcher/dsobject.c
+++ b/drivers/acpi/dispatcher/dsobject.c
@@ -582,6 +582,11 @@ acpi_ds_init_object_from_op (
obj_desc->reference.opcode = AML_ARG_OP;
obj_desc->reference.offset = opcode - AML_ARG_OP;
+
+#ifndef ACPI_NO_METHOD_EXECUTION
+ status = acpi_ds_method_data_get_node (AML_ARG_OP, obj_desc->reference.offset,
+ walk_state, (struct acpi_namespace_node **) &obj_desc->reference.object);
+#endif
break;
default: /* Other literals, etc.. */
diff --git a/drivers/acpi/dispatcher/dsopcode.c b/drivers/acpi/dispatcher/dsopcode.c
index 405c0cbc1c91..e0a313f57509 100644
--- a/drivers/acpi/dispatcher/dsopcode.c
+++ b/drivers/acpi/dispatcher/dsopcode.c
@@ -243,8 +243,8 @@ acpi_ds_get_buffer_arguments (
node = obj_desc->buffer.node;
if (!node) {
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
- "No pointer back to NS node in buffer %p\n", obj_desc));
+ ACPI_REPORT_ERROR ((
+ "No pointer back to NS node in buffer obj %p\n", obj_desc));
return_ACPI_STATUS (AE_AML_INTERNAL);
}
@@ -290,7 +290,7 @@ acpi_ds_get_package_arguments (
node = obj_desc->package.node;
if (!node) {
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
+ ACPI_REPORT_ERROR ((
"No pointer back to NS node in package %p\n", obj_desc));
return_ACPI_STATUS (AE_AML_INTERNAL);
}
diff --git a/drivers/acpi/dispatcher/dsutils.c b/drivers/acpi/dispatcher/dsutils.c
index 19468da976bb..5c6a37e057dc 100644
--- a/drivers/acpi/dispatcher/dsutils.c
+++ b/drivers/acpi/dispatcher/dsutils.c
@@ -280,7 +280,8 @@ acpi_ds_resolve_operands (
/*
* Attempt to resolve each of the valid operands
- * Method arguments are passed by value, not by reference
+ * Method arguments are passed by reference, not by value. This means
+ * that the actual objects are passed, not copies of the objects.
*/
for (i = 0; i < walk_state->num_operands; i++) {
status = acpi_ex_resolve_to_value (&walk_state->operands[i], walk_state);
diff --git a/drivers/acpi/dispatcher/dswstate.c b/drivers/acpi/dispatcher/dswstate.c
index bde5d69ff77c..2b39562264bf 100644
--- a/drivers/acpi/dispatcher/dswstate.c
+++ b/drivers/acpi/dispatcher/dswstate.c
@@ -328,7 +328,7 @@ acpi_ds_result_push (
state = walk_state->results;
if (!state) {
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "No result stack frame\n"));
+ ACPI_REPORT_ERROR (("No result stack frame during push\n"));
return (AE_AML_INTERNAL);
}
diff --git a/drivers/acpi/executer/exconvrt.c b/drivers/acpi/executer/exconvrt.c
index fd80b7533445..04c04e4ae39b 100644
--- a/drivers/acpi/executer/exconvrt.c
+++ b/drivers/acpi/executer/exconvrt.c
@@ -55,8 +55,9 @@
*
* FUNCTION: acpi_ex_convert_to_integer
*
- * PARAMETERS: *obj_desc - Object to be converted. Must be an
+ * PARAMETERS: obj_desc - Object to be converted. Must be an
* Integer, Buffer, or String
+ * result_desc - Where the new Integer object is returned
* walk_state - Current method state
*
* RETURN: Status
@@ -189,8 +190,9 @@ acpi_ex_convert_to_integer (
*
* FUNCTION: acpi_ex_convert_to_buffer
*
- * PARAMETERS: *obj_desc - Object to be converted. Must be an
+ * PARAMETERS: obj_desc - Object to be converted. Must be an
* Integer, Buffer, or String
+ * result_desc - Where the new buffer object is returned
* walk_state - Current method state
*
* RETURN: Status
@@ -319,6 +321,7 @@ acpi_ex_convert_to_ascii (
ACPI_FUNCTION_ENTRY ();
+
if (data_width < sizeof (acpi_integer)) {
leading_zero = FALSE;
length = data_width;
@@ -328,22 +331,21 @@ acpi_ex_convert_to_ascii (
length = sizeof (acpi_integer);
}
-
switch (base) {
case 10:
remainder = 0;
- for (i = ACPI_MAX_DECIMAL_DIGITS; i > 0 ; i--) {
+ for (i = ACPI_MAX_DECIMAL_DIGITS; i > 0; i--) {
/* Divide by nth factor of 10 */
digit = integer;
- for (j = 1; j < i; j++) {
+ for (j = 0; j < i; j++) {
(void) acpi_ut_short_divide (&digit, 10, &digit, &remainder);
}
/* Create the decimal digit */
- if (digit != 0) {
+ if (remainder != 0) {
leading_zero = FALSE;
}
@@ -354,6 +356,7 @@ acpi_ex_convert_to_ascii (
}
break;
+
case 16:
/* Copy the integer to the buffer */
@@ -372,13 +375,14 @@ acpi_ex_convert_to_ascii (
}
break;
+
default:
break;
}
/*
* Since leading zeros are supressed, we must check for the case where
- * the integer equals 0.
+ * the integer equals 0
*
* Finally, null terminate the string and return the length
*/
@@ -396,8 +400,11 @@ acpi_ex_convert_to_ascii (
*
* FUNCTION: acpi_ex_convert_to_string
*
- * PARAMETERS: *obj_desc - Object to be converted. Must be an
- * Integer, Buffer, or String
+ * PARAMETERS: obj_desc - Object to be converted. Must be an
+ * Integer, Buffer, or String
+ * result_desc - Where the string object is returned
+ * Base - 10 or 16
+ * max_length - Max length of the returned string
* walk_state - Current method state
*
* RETURN: Status
@@ -415,10 +422,10 @@ acpi_ex_convert_to_string (
struct acpi_walk_state *walk_state)
{
union acpi_operand_object *ret_desc;
- u32 i;
- u32 string_length;
u8 *new_buf;
u8 *pointer;
+ u32 string_length;
+ u32 i;
ACPI_FUNCTION_TRACE_PTR ("ex_convert_to_string", obj_desc);
@@ -539,7 +546,6 @@ acpi_ex_convert_to_string (
return_ACPI_STATUS (AE_TYPE);
}
-
/*
* If we are about to overwrite the original object on the operand stack,
* we must remove a reference on the original object because we are
@@ -562,6 +568,7 @@ acpi_ex_convert_to_string (
*
* PARAMETERS: destination_type - Current type of the destination
* source_desc - Source object to be converted.
+ * result_desc - Where the converted object is returned
* walk_state - Current method state
*
* RETURN: Status
@@ -653,6 +660,8 @@ acpi_ex_convert_to_target_type (
default:
+ ACPI_REPORT_ERROR (("Bad destination type during conversion: %X\n",
+ destination_type));
status = AE_AML_INTERNAL;
break;
}
@@ -672,6 +681,8 @@ acpi_ex_convert_to_target_type (
GET_CURRENT_ARG_TYPE (walk_state->op_info->runtime_args),
walk_state->op_info->name, acpi_ut_get_type_name (destination_type)));
+ ACPI_REPORT_ERROR (("Bad Target Type (ARGI): %X\n",
+ GET_CURRENT_ARG_TYPE (walk_state->op_info->runtime_args)))
status = AE_AML_INTERNAL;
}
diff --git a/drivers/acpi/executer/exfldio.c b/drivers/acpi/executer/exfldio.c
index 2b5e0666ca16..6545d9404660 100644
--- a/drivers/acpi/executer/exfldio.c
+++ b/drivers/acpi/executer/exfldio.c
@@ -507,8 +507,8 @@ acpi_ex_field_datum_io (
default:
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "%p, Wrong object type - %s\n",
- obj_desc, acpi_ut_get_object_type_name (obj_desc)));
+ ACPI_REPORT_ERROR (("Wrong object type in field I/O %X\n",
+ ACPI_GET_OBJECT_TYPE (obj_desc)));
status = AE_AML_INTERNAL;
break;
}
diff --git a/drivers/acpi/executer/exmisc.c b/drivers/acpi/executer/exmisc.c
index d41df0e9b1bc..74fd68491ba8 100644
--- a/drivers/acpi/executer/exmisc.c
+++ b/drivers/acpi/executer/exmisc.c
@@ -103,7 +103,7 @@ acpi_ex_get_object_reference (
default:
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Unknown Reference subtype %X\n",
+ ACPI_REPORT_ERROR (("Unknown Reference subtype in get ref %X\n",
obj_desc->reference.opcode));
return_ACPI_STATUS (AE_AML_INTERNAL);
}
@@ -121,8 +121,8 @@ acpi_ex_get_object_reference (
default:
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "%p has invalid descriptor [%s]\n",
- obj_desc, acpi_ut_get_descriptor_name (obj_desc)));
+ ACPI_REPORT_ERROR (("Invalid descriptor type in get ref: %X\n",
+ ACPI_GET_DESCRIPTOR_TYPE (obj_desc)));
return_ACPI_STATUS (AE_TYPE);
}
@@ -349,6 +349,8 @@ acpi_ex_do_concatenate (
/* Invalid object type, should not happen here */
+ ACPI_REPORT_ERROR (("Concat - invalid obj type: %X\n",
+ ACPI_GET_OBJECT_TYPE (obj_desc1)));
status = AE_AML_INTERNAL;
return_desc = NULL;
}
diff --git a/drivers/acpi/executer/exoparg2.c b/drivers/acpi/executer/exoparg2.c
index 43bf6780477e..70602ad44299 100644
--- a/drivers/acpi/executer/exoparg2.c
+++ b/drivers/acpi/executer/exoparg2.c
@@ -329,6 +329,8 @@ acpi_ex_opcode_2A_1T_1R (
break;
default:
+ ACPI_REPORT_ERROR (("Concat - invalid obj type: %X\n",
+ ACPI_GET_OBJECT_TYPE (operand[0])));
status = AE_AML_INTERNAL;
}
@@ -433,7 +435,7 @@ acpi_ex_opcode_2A_1T_1R (
}
return_desc->reference.target_type = ACPI_TYPE_PACKAGE;
- return_desc->reference.object = operand[0]->package.elements [index];
+ return_desc->reference.object = operand[0];
return_desc->reference.where = &operand[0]->package.elements [index];
}
else {
diff --git a/drivers/acpi/executer/exprep.c b/drivers/acpi/executer/exprep.c
index 682cf2a718a3..c5c6dd8e0cf7 100644
--- a/drivers/acpi/executer/exprep.c
+++ b/drivers/acpi/executer/exprep.c
@@ -507,7 +507,7 @@ acpi_ex_prep_field_value (
(info->field_bit_position / ACPI_MUL_8 (obj_desc->field.access_byte_width));
if (!obj_desc->index_field.data_obj || !obj_desc->index_field.index_obj) {
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Null Index Object\n"));
+ ACPI_REPORT_ERROR (("Null Index Object during field prep\n"));
return_ACPI_STATUS (AE_AML_INTERNAL);
}
diff --git a/drivers/acpi/executer/exresolv.c b/drivers/acpi/executer/exresolv.c
index 94dec3db4c1e..e998da7cd7ea 100644
--- a/drivers/acpi/executer/exresolv.c
+++ b/drivers/acpi/executer/exresolv.c
@@ -238,8 +238,8 @@ acpi_ex_resolve_object_to_value (
/* Invalid reference object */
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
- "Unknown target_type %X in Index/Reference obj %p\n",
+ ACPI_REPORT_ERROR ((
+ "During resolve, Unknown target_type %X in Index/Reference obj %p\n",
stack_desc->reference.target_type, stack_desc));
status = AE_AML_INTERNAL;
break;
@@ -258,7 +258,7 @@ acpi_ex_resolve_object_to_value (
default:
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Unknown Reference opcode %X (%s) in %p\n",
+ ACPI_REPORT_ERROR (("During resolve, Unknown Reference opcode %X (%s) in %p\n",
opcode, acpi_ps_get_opcode_name (opcode), stack_desc));
status = AE_AML_INTERNAL;
break;
diff --git a/drivers/acpi/executer/exresop.c b/drivers/acpi/executer/exresop.c
index 0ade12486d0f..d410bd7f1fe3 100644
--- a/drivers/acpi/executer/exresop.c
+++ b/drivers/acpi/executer/exresop.c
@@ -154,7 +154,7 @@ acpi_ex_resolve_operands (
arg_types = op_info->runtime_args;
if (arg_types == ARGI_INVALID_OPCODE) {
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Internal - %X is not a valid AML opcode\n",
+ ACPI_REPORT_ERROR (("resolve_operands: %X is not a valid AML opcode\n",
opcode));
return_ACPI_STATUS (AE_AML_INTERNAL);
@@ -172,7 +172,7 @@ acpi_ex_resolve_operands (
*/
while (GET_CURRENT_ARG_TYPE (arg_types)) {
if (!stack_ptr || !*stack_ptr) {
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Internal - null stack entry at %p\n",
+ ACPI_REPORT_ERROR (("resolve_operands: Null stack entry at %p\n",
stack_ptr));
return_ACPI_STATUS (AE_AML_INTERNAL);
diff --git a/drivers/acpi/executer/exstore.c b/drivers/acpi/executer/exstore.c
index cafc4ab3c5af..8c884652ca48 100644
--- a/drivers/acpi/executer/exstore.c
+++ b/drivers/acpi/executer/exstore.c
@@ -125,7 +125,7 @@ acpi_ex_store (
default:
- /* Destination is not an Reference */
+ /* Destination is not a Reference object */
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"Destination is not a Reference or Constant object [%p]\n", dest_desc));
@@ -189,35 +189,38 @@ acpi_ex_store (
switch (ACPI_GET_OBJECT_TYPE (source_desc)) {
case ACPI_TYPE_INTEGER:
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "%8.8X%8.8X\n",
+ ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "0x%8.8X%8.8X\n",
ACPI_FORMAT_UINT64 (source_desc->integer.value)));
break;
case ACPI_TYPE_BUFFER:
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "Length %.2X\n",
+ ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "Length 0x%.2X",
(u32) source_desc->buffer.length));
+ ACPI_DUMP_BUFFER (source_desc->buffer.pointer,
+ (source_desc->buffer.length < 32) ? source_desc->buffer.length : 32);
break;
case ACPI_TYPE_STRING:
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "%s\n", source_desc->string.pointer));
+ ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "Length 0x%.2X, \"%s\"\n",
+ source_desc->string.length, source_desc->string.pointer));
break;
case ACPI_TYPE_PACKAGE:
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "Elements Ptr - %p\n",
- source_desc->package.elements));
+ ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "Size 0x%.2X Elements Ptr - %p\n",
+ source_desc->package.count, source_desc->package.elements));
break;
default:
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "Type %s %p\n",
- acpi_ut_get_object_type_name (source_desc), source_desc));
+ ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "%p\n",
+ source_desc));
break;
}
@@ -227,7 +230,7 @@ acpi_ex_store (
default:
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Unknown Reference opcode %X\n",
+ ACPI_REPORT_ERROR (("ex_store: Unknown Reference opcode %X\n",
ref_desc->reference.opcode));
ACPI_DUMP_ENTRY (ref_desc, ACPI_LV_ERROR);
@@ -263,6 +266,7 @@ acpi_ex_store_object_to_index (
union acpi_operand_object *obj_desc;
union acpi_operand_object *new_desc;
u8 value = 0;
+ u32 i;
ACPI_FUNCTION_TRACE ("ex_store_object_to_index");
@@ -283,6 +287,7 @@ acpi_ex_store_object_to_index (
/*
* The object at *(index_desc->Reference.Where) is the
* element within the package that is to be modified.
+ * The parent package object is at index_desc->Reference.Object
*/
obj_desc = *(index_desc->reference.where);
@@ -309,6 +314,12 @@ acpi_ex_store_object_to_index (
if (new_desc == source_desc) {
acpi_ut_add_reference (new_desc);
}
+
+ /* Increment reference count by the ref count of the parent package -1 */
+
+ for (i = 1; i < ((union acpi_operand_object *) index_desc->reference.object)->common.reference_count; i++) {
+ acpi_ut_add_reference (new_desc);
+ }
}
break;
diff --git a/drivers/acpi/executer/exstoren.c b/drivers/acpi/executer/exstoren.c
index 074b89399508..659a86fda05d 100644
--- a/drivers/acpi/executer/exstoren.c
+++ b/drivers/acpi/executer/exstoren.c
@@ -112,6 +112,12 @@ acpi_ex_resolve_object (
}
}
+ /* For copy_object, no further validation necessary */
+
+ if (walk_state->opcode == AML_COPY_OP) {
+ break;
+ }
+
/*
* Must have a Integer, Buffer, or String
*/
@@ -136,7 +142,7 @@ acpi_ex_resolve_object (
/*
* Aliases are resolved by acpi_ex_prep_operands
*/
- ACPI_DEBUG_PRINT ((ACPI_DB_WARN, "Store into Alias - should never happen\n"));
+ ACPI_REPORT_ERROR (("Store into Alias - should never happen\n"));
status = AE_AML_INTERNAL;
break;
diff --git a/drivers/acpi/namespace/nsaccess.c b/drivers/acpi/namespace/nsaccess.c
index aa5b8f2745fd..c4ad91b639c8 100644
--- a/drivers/acpi/namespace/nsaccess.c
+++ b/drivers/acpi/namespace/nsaccess.c
@@ -314,7 +314,7 @@ acpi_ns_lookup (
else {
prefix_node = scope_info->scope.node;
if (ACPI_GET_DESCRIPTOR_TYPE (prefix_node) != ACPI_DESC_TYPE_NAMED) {
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "%p Not a namespace node [%s]\n",
+ ACPI_REPORT_ERROR (("ns_lookup: %p is not a namespace node [%s]\n",
prefix_node, acpi_ut_get_descriptor_name (prefix_node)));
return_ACPI_STATUS (AE_AML_INTERNAL);
}
diff --git a/drivers/acpi/parser/psargs.c b/drivers/acpi/parser/psargs.c
index e4901cdb8f3c..87bf4b61e8a0 100644
--- a/drivers/acpi/parser/psargs.c
+++ b/drivers/acpi/parser/psargs.c
@@ -315,8 +315,8 @@ acpi_ps_get_next_namepath (
acpi_ps_append_arg (arg, name_op);
if (!method_desc) {
- ACPI_DEBUG_PRINT ((ACPI_DB_PARSE,
- "Control Method - %p has no attached object\n",
+ ACPI_REPORT_ERROR ((
+ "ps_get_next_namepath: Control Method %p has no attached object\n",
node));
return_ACPI_STATUS (AE_AML_INTERNAL);
}
diff --git a/drivers/acpi/sleep/proc.c b/drivers/acpi/sleep/proc.c
index 9290427f2041..5decea39bd50 100644
--- a/drivers/acpi/sleep/proc.c
+++ b/drivers/acpi/sleep/proc.c
@@ -44,10 +44,10 @@ static int acpi_system_sleep_open_fs(struct inode *inode, struct file *file)
return single_open(file, acpi_system_sleep_seq_show, PDE(inode)->data);
}
-static int
+static ssize_t
acpi_system_write_sleep (
struct file *file,
- const char *buffer,
+ const char __user *buffer,
size_t count,
loff_t *ppos)
{
@@ -189,10 +189,10 @@ get_date_field (
}
-static int
+static ssize_t
acpi_system_write_alarm (
struct file *file,
- const char *buffer,
+ const char __user *buffer,
size_t count,
loff_t *ppos)
{
diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c
index 68c1a13cc9eb..ed66215b32ab 100644
--- a/drivers/acpi/utils.c
+++ b/drivers/acpi/utils.c
@@ -350,7 +350,7 @@ acpi_evaluate_reference (
if ((buffer.length == 0) || !package) {
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
"No return object (len %X ptr %p)\n",
- buffer.length, package));
+ (unsigned)buffer.length, package));
status = AE_BAD_DATA;
acpi_util_eval_error(handle, pathname, status);
goto end;
diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h
index 8879c2c830ec..63e50a16ded3 100644
--- a/include/acpi/acconfig.h
+++ b/include/acpi/acconfig.h
@@ -64,7 +64,7 @@
/* Version string */
-#define ACPI_CA_VERSION 0x20040116
+#define ACPI_CA_VERSION 0x20040211
/* Maximum objects in the various object caches */