aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/exconfig.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/acpica/exconfig.c')
-rw-r--r--drivers/acpi/acpica/exconfig.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/acpi/acpica/exconfig.c b/drivers/acpi/acpica/exconfig.c
index eca6f63a53fd..277fd609611a 100644
--- a/drivers/acpi/acpica/exconfig.c
+++ b/drivers/acpi/acpica/exconfig.c
@@ -280,23 +280,22 @@ acpi_ex_region_read(union acpi_operand_object *obj_desc, u32 length, u8 *buffer)
280{ 280{
281 acpi_status status; 281 acpi_status status;
282 acpi_integer value; 282 acpi_integer value;
283 acpi_physical_address address; 283 u32 region_offset = 0;
284 u32 i; 284 u32 i;
285 285
286 address = obj_desc->region.address;
287
288 /* Bytewise reads */ 286 /* Bytewise reads */
289 287
290 for (i = 0; i < length; i++) { 288 for (i = 0; i < length; i++) {
291 status = acpi_ev_address_space_dispatch(obj_desc, ACPI_READ, 289 status = acpi_ev_address_space_dispatch(obj_desc, ACPI_READ,
292 address, 8, &value); 290 region_offset, 8,
291 &value);
293 if (ACPI_FAILURE(status)) { 292 if (ACPI_FAILURE(status)) {
294 return status; 293 return status;
295 } 294 }
296 295
297 *buffer = (u8)value; 296 *buffer = (u8)value;
298 buffer++; 297 buffer++;
299 address++; 298 region_offset++;
300 } 299 }
301 300
302 return AE_OK; 301 return AE_OK;