aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/exconvrt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/acpica/exconvrt.c')
-rw-r--r--drivers/acpi/acpica/exconvrt.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/drivers/acpi/acpica/exconvrt.c b/drivers/acpi/acpica/exconvrt.c
index 37d0d39e60a6..bda7aed0404b 100644
--- a/drivers/acpi/acpica/exconvrt.c
+++ b/drivers/acpi/acpica/exconvrt.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2008, Intel Corp. 8 * Copyright (C) 2000 - 2010, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
@@ -51,8 +51,7 @@ ACPI_MODULE_NAME("exconvrt")
51 51
52/* Local prototypes */ 52/* Local prototypes */
53static u32 53static u32
54acpi_ex_convert_to_ascii(acpi_integer integer, 54acpi_ex_convert_to_ascii(u64 integer, u16 base, u8 *string, u8 max_length);
55 u16 base, u8 * string, u8 max_length);
56 55
57/******************************************************************************* 56/*******************************************************************************
58 * 57 *
@@ -75,7 +74,7 @@ acpi_ex_convert_to_integer(union acpi_operand_object *obj_desc,
75{ 74{
76 union acpi_operand_object *return_desc; 75 union acpi_operand_object *return_desc;
77 u8 *pointer; 76 u8 *pointer;
78 acpi_integer result; 77 u64 result;
79 u32 i; 78 u32 i;
80 u32 count; 79 u32 count;
81 acpi_status status; 80 acpi_status status;
@@ -155,7 +154,7 @@ acpi_ex_convert_to_integer(union acpi_operand_object *obj_desc,
155 * Little endian is used, meaning that the first byte of the buffer 154 * Little endian is used, meaning that the first byte of the buffer
156 * is the LSB of the integer 155 * is the LSB of the integer
157 */ 156 */
158 result |= (((acpi_integer) pointer[i]) << (i * 8)); 157 result |= (((u64) pointer[i]) << (i * 8));
159 } 158 }
160 break; 159 break;
161 160
@@ -167,7 +166,7 @@ acpi_ex_convert_to_integer(union acpi_operand_object *obj_desc,
167 166
168 /* Create a new integer */ 167 /* Create a new integer */
169 168
170 return_desc = acpi_ut_create_internal_object(ACPI_TYPE_INTEGER); 169 return_desc = acpi_ut_create_integer_object(result);
171 if (!return_desc) { 170 if (!return_desc) {
172 return_ACPI_STATUS(AE_NO_MEMORY); 171 return_ACPI_STATUS(AE_NO_MEMORY);
173 } 172 }
@@ -177,7 +176,6 @@ acpi_ex_convert_to_integer(union acpi_operand_object *obj_desc,
177 176
178 /* Save the Result */ 177 /* Save the Result */
179 178
180 return_desc->integer.value = result;
181 acpi_ex_truncate_for32bit_table(return_desc); 179 acpi_ex_truncate_for32bit_table(return_desc);
182 *result_desc = return_desc; 180 *result_desc = return_desc;
183 return_ACPI_STATUS(AE_OK); 181 return_ACPI_STATUS(AE_OK);
@@ -286,10 +284,9 @@ acpi_ex_convert_to_buffer(union acpi_operand_object *obj_desc,
286 ******************************************************************************/ 284 ******************************************************************************/
287 285
288static u32 286static u32
289acpi_ex_convert_to_ascii(acpi_integer integer, 287acpi_ex_convert_to_ascii(u64 integer, u16 base, u8 *string, u8 data_width)
290 u16 base, u8 * string, u8 data_width)
291{ 288{
292 acpi_integer digit; 289 u64 digit;
293 u32 i; 290 u32 i;
294 u32 j; 291 u32 j;
295 u32 k = 0; 292 u32 k = 0;
@@ -532,10 +529,9 @@ acpi_ex_convert_to_string(union acpi_operand_object * obj_desc,
532 * (separated by commas or spaces) 529 * (separated by commas or spaces)
533 */ 530 */
534 for (i = 0; i < obj_desc->buffer.length; i++) { 531 for (i = 0; i < obj_desc->buffer.length; i++) {
535 new_buf += acpi_ex_convert_to_ascii((acpi_integer) 532 new_buf += acpi_ex_convert_to_ascii((u64) obj_desc->
536 obj_desc->buffer. 533 buffer.pointer[i],
537 pointer[i], base, 534 base, new_buf, 1);
538 new_buf, 1);
539 *new_buf++ = separator; /* each separated by a comma or space */ 535 *new_buf++ = separator; /* each separated by a comma or space */
540 } 536 }
541 537