Commit e4abe719 authored by Lee, Chun-Yi's avatar Lee, Chun-Yi Committed by Greg Kroah-Hartman

ACPI / RTC: Fix CMOS RTC opregion handler accesses to wrong addresses

commit 9389f46e upstream.

The value64 parameter is an u64 point that used to transfer the value
for write to CMOS, or used to return the value that's read from CMOS.

The value64 is an u64 point, so don't need get address again. It causes
acpi_cmos_rtc_space_handler always return 0 to reader and didn't write
expected value to CMOS.
Signed-off-by: default avatarLee, Chun-Yi <jlee@suse.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3d275c4b
...@@ -33,7 +33,7 @@ acpi_cmos_rtc_space_handler(u32 function, acpi_physical_address address, ...@@ -33,7 +33,7 @@ acpi_cmos_rtc_space_handler(u32 function, acpi_physical_address address,
void *handler_context, void *region_context) void *handler_context, void *region_context)
{ {
int i; int i;
u8 *value = (u8 *)&value64; u8 *value = (u8 *)value64;
if (address > 0xff || !value64) if (address > 0xff || !value64)
return AE_BAD_PARAMETER; return AE_BAD_PARAMETER;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment