aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/executer/exfldio.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/executer/exfldio.c')
-rw-r--r--drivers/acpi/executer/exfldio.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/acpi/executer/exfldio.c b/drivers/acpi/executer/exfldio.c
index 3b7c4352ec57..051053f7cccb 100644
--- a/drivers/acpi/executer/exfldio.c
+++ b/drivers/acpi/executer/exfldio.c
@@ -785,6 +785,7 @@ acpi_ex_insert_into_field(union acpi_operand_object *obj_desc,
785{ 785{
786 acpi_status status; 786 acpi_status status;
787 acpi_integer mask; 787 acpi_integer mask;
788 acpi_integer width_mask;
788 acpi_integer merged_datum; 789 acpi_integer merged_datum;
789 acpi_integer raw_datum = 0; 790 acpi_integer raw_datum = 0;
790 u32 field_offset = 0; 791 u32 field_offset = 0;
@@ -809,8 +810,11 @@ acpi_ex_insert_into_field(union acpi_operand_object *obj_desc,
809 810
810 /* Compute the number of datums (access width data items) */ 811 /* Compute the number of datums (access width data items) */
811 812
813 width_mask =
814 ACPI_MASK_BITS_ABOVE(obj_desc->common_field.access_bit_width);
812 mask = 815 mask =
813 ACPI_MASK_BITS_BELOW(obj_desc->common_field.start_field_bit_offset); 816 width_mask & ACPI_MASK_BITS_BELOW(obj_desc->common_field.
817 start_field_bit_offset);
814 818
815 datum_count = ACPI_ROUND_UP_TO(obj_desc->common_field.bit_length, 819 datum_count = ACPI_ROUND_UP_TO(obj_desc->common_field.bit_length,
816 obj_desc->common_field.access_bit_width); 820 obj_desc->common_field.access_bit_width);
@@ -850,7 +854,7 @@ acpi_ex_insert_into_field(union acpi_operand_object *obj_desc,
850 merged_datum = raw_datum >> 854 merged_datum = raw_datum >>
851 (obj_desc->common_field.access_bit_width - 855 (obj_desc->common_field.access_bit_width -
852 obj_desc->common_field.start_field_bit_offset); 856 obj_desc->common_field.start_field_bit_offset);
853 mask = ACPI_INTEGER_MAX; 857 mask = width_mask;
854 858
855 if (i == datum_count) { 859 if (i == datum_count) {
856 break; 860 break;