ACPICA: Enhance the ACPI_GETx and ACPI_SETx macros.
Improve the implementation of the macros. Change the SETx macros
to the style of (destination, source). Also add ACPI_CASTx
companion macros. Lv Zheng.
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
diff --git a/drivers/acpi/acpica/exregion.c b/drivers/acpi/acpica/exregion.c
index 06a4924..28d3cd9 100644
--- a/drivers/acpi/acpica/exregion.c
+++ b/drivers/acpi/acpica/exregion.c
@@ -239,19 +239,19 @@
switch (bit_width) {
case 8:
- ACPI_SET8(logical_addr_ptr) = (u8)*value;
+ ACPI_SET8(logical_addr_ptr, *value);
break;
case 16:
- ACPI_SET16(logical_addr_ptr) = (u16)*value;
+ ACPI_SET16(logical_addr_ptr, *value);
break;
case 32:
- ACPI_SET32(logical_addr_ptr) = (u32)*value;
+ ACPI_SET32(logical_addr_ptr, *value);
break;
case 64:
- ACPI_SET64(logical_addr_ptr) = (u64)*value;
+ ACPI_SET64(logical_addr_ptr, *value);
break;
default: