aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/executer/exregion.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/executer/exregion.c')
-rw-r--r--drivers/acpi/executer/exregion.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/acpi/executer/exregion.c b/drivers/acpi/executer/exregion.c
index 4fba452a5590..3cc97ba48b36 100644
--- a/drivers/acpi/executer/exregion.c
+++ b/drivers/acpi/executer/exregion.c
@@ -477,23 +477,16 @@ acpi_ex_data_table_space_handler(u32 function,
477 acpi_integer * value, 477 acpi_integer * value,
478 void *handler_context, void *region_context) 478 void *handler_context, void *region_context)
479{ 479{
480 acpi_status status = AE_OK;
481 u32 byte_width = ACPI_DIV_8(bit_width);
482 u32 i;
483 char *logical_addr_ptr;
484
485 ACPI_FUNCTION_TRACE(ex_data_table_space_handler); 480 ACPI_FUNCTION_TRACE(ex_data_table_space_handler);
486 481
487 logical_addr_ptr = ACPI_PHYSADDR_TO_PTR(address);
488
489 /* Perform the memory read or write */ 482 /* Perform the memory read or write */
490 483
491 switch (function) { 484 switch (function) {
492 case ACPI_READ: 485 case ACPI_READ:
493 486
494 for (i = 0; i < byte_width; i++) { 487 ACPI_MEMCPY(ACPI_CAST_PTR(char, value),
495 ((char *)value)[i] = logical_addr_ptr[i]; 488 ACPI_PHYSADDR_TO_PTR(address),
496 } 489 ACPI_DIV_8(bit_width));
497 break; 490 break;
498 491
499 case ACPI_WRITE: 492 case ACPI_WRITE:
@@ -502,5 +495,5 @@ acpi_ex_data_table_space_handler(u32 function,
502 return_ACPI_STATUS(AE_SUPPORT); 495 return_ACPI_STATUS(AE_SUPPORT);
503 } 496 }
504 497
505 return_ACPI_STATUS(status); 498 return_ACPI_STATUS(AE_OK);
506} 499}