aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/rsmisc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/acpica/rsmisc.c')
-rw-r--r--drivers/acpi/acpica/rsmisc.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/drivers/acpi/acpica/rsmisc.c b/drivers/acpi/acpica/rsmisc.c
index b528ed903fb2..b112c7b1abbf 100644
--- a/drivers/acpi/acpica/rsmisc.c
+++ b/drivers/acpi/acpica/rsmisc.c
@@ -189,8 +189,8 @@ acpi_rs_convert_aml_to_resource(struct acpi_resource *resource,
189 item_count = ACPI_GET8(source); 189 item_count = ACPI_GET8(source);
190 ACPI_SET8(destination, item_count); 190 ACPI_SET8(destination, item_count);
191 191
192 resource->length = resource->length + 192 resource->length =
193 (info->value * item_count); 193 resource->length + (info->value * item_count);
194 break; 194 break;
195 195
196 case ACPI_RSC_COUNT_GPIO_RES: 196 case ACPI_RSC_COUNT_GPIO_RES:
@@ -445,8 +445,8 @@ exit:
445 445
446 /* Round the resource struct length up to the next boundary (32 or 64) */ 446 /* Round the resource struct length up to the next boundary (32 or 64) */
447 447
448 resource->length = 448 resource->length = (u32)
449 (u32)ACPI_ROUND_UP_TO_NATIVE_WORD(resource->length); 449 ACPI_ROUND_UP_TO_NATIVE_WORD(resource->length);
450 } 450 }
451 return_ACPI_STATUS(AE_OK); 451 return_ACPI_STATUS(AE_OK);
452} 452}
@@ -550,9 +550,8 @@ acpi_rs_convert_resource_to_aml(struct acpi_resource *resource,
550 item_count = ACPI_GET8(source); 550 item_count = ACPI_GET8(source);
551 ACPI_SET8(destination, item_count); 551 ACPI_SET8(destination, item_count);
552 552
553 aml_length = 553 aml_length = (u16)
554 (u16)(aml_length + 554 (aml_length + (info->value * (item_count - 1)));
555 (info->value * (item_count - 1)));
556 break; 555 break;
557 556
558 case ACPI_RSC_COUNT16: 557 case ACPI_RSC_COUNT16:
@@ -723,11 +722,10 @@ acpi_rs_convert_resource_to_aml(struct acpi_resource *resource,
723 /* 722 /*
724 * 16-bit encoded bitmask (IRQ macro) 723 * 16-bit encoded bitmask (IRQ macro)
725 */ 724 */
726 temp16 = acpi_rs_encode_bitmask(source, 725 temp16 =
727 *ACPI_ADD_PTR(u8, 726 acpi_rs_encode_bitmask(source,
728 resource, 727 *ACPI_ADD_PTR(u8, resource,
729 info-> 728 info->value));
730 value));
731 ACPI_MOVE_16_TO_16(destination, &temp16); 729 ACPI_MOVE_16_TO_16(destination, &temp16);
732 break; 730 break;
733 731