ACPICA: Add missing type casts in GPE register access code

Type casts needed on 32-bit systems are missing in two places in the
GPE register access code, so add them.

Fixes: 7a8379eb41 ("ACPICA: Add support for using logical addresses of GPE blocks")
Reported-and-tested-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
Rafael J. Wysocki 2020-10-19 14:46:39 +02:00
parent cf1d2b44f6
commit 652af650d3
1 changed files with 2 additions and 2 deletions

View File

@ -47,7 +47,7 @@ acpi_status acpi_hw_gpe_read(u64 *value, struct acpi_gpe_address *reg)
if (reg->space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY) { if (reg->space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY) {
#ifdef ACPI_GPE_USE_LOGICAL_ADDRESSES #ifdef ACPI_GPE_USE_LOGICAL_ADDRESSES
*value = (u64)ACPI_GET8(reg->address); *value = (u64)ACPI_GET8((unsigned long)reg->address);
return_ACPI_STATUS(AE_OK); return_ACPI_STATUS(AE_OK);
#else #else
return acpi_os_read_memory((acpi_physical_address)reg->address, return acpi_os_read_memory((acpi_physical_address)reg->address,
@ -82,7 +82,7 @@ acpi_status acpi_hw_gpe_write(u64 value, struct acpi_gpe_address *reg)
{ {
if (reg->space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY) { if (reg->space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY) {
#ifdef ACPI_GPE_USE_LOGICAL_ADDRESSES #ifdef ACPI_GPE_USE_LOGICAL_ADDRESSES
ACPI_SET8(reg->address, value); ACPI_SET8((unsigned long)reg->address, value);
return_ACPI_STATUS(AE_OK); return_ACPI_STATUS(AE_OK);
#else #else
return acpi_os_write_memory((acpi_physical_address)reg->address, return acpi_os_write_memory((acpi_physical_address)reg->address,