aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-04-17 13:58:38 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-04-17 13:58:38 -0400
commitd6f533c8c7a4d83ed1c075f919a68031b9c67185 (patch)
tree5638abd7b9aa98d300148dd76f4f2f800fb5a16e /drivers
parent65832940eb74dca5ef1c8df086540825a00ad0c8 (diff)
parentbc3966921ff9528ae44a4a108085ab06107c1e7d (diff)
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: ACPI: EC: Limit burst to 64 bits
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/acpica/exprep.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/acpi/acpica/exprep.c b/drivers/acpi/acpica/exprep.c
index a610ebe18edd..2fbfe51fb141 100644
--- a/drivers/acpi/acpica/exprep.c
+++ b/drivers/acpi/acpica/exprep.c
@@ -471,13 +471,18 @@ acpi_status acpi_ex_prep_field_value(struct acpi_create_field_info *info)
471 /* allow full data read from EC address space */ 471 /* allow full data read from EC address space */
472 if (obj_desc->field.region_obj->region.space_id == 472 if (obj_desc->field.region_obj->region.space_id ==
473 ACPI_ADR_SPACE_EC) { 473 ACPI_ADR_SPACE_EC) {
474 if (obj_desc->common_field.bit_length > 8) 474 if (obj_desc->common_field.bit_length > 8) {
475 obj_desc->common_field.access_bit_width = 475 unsigned width =
476 ACPI_ROUND_UP(obj_desc->common_field. 476 ACPI_ROUND_BITS_UP_TO_BYTES(
477 bit_length, 8); 477 obj_desc->common_field.bit_length);
478 // access_bit_width is u8, don't overflow it
479 if (width > 8)
480 width = 8;
478 obj_desc->common_field.access_byte_width = 481 obj_desc->common_field.access_byte_width =
479 ACPI_DIV_8(obj_desc->common_field. 482 width;
480 access_bit_width); 483 obj_desc->common_field.access_bit_width =
484 8 * width;
485 }
481 } 486 }
482 487
483 ACPI_DEBUG_PRINT((ACPI_DB_BFIELD, 488 ACPI_DEBUG_PRINT((ACPI_DB_BFIELD,