aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorLee, Chun-Yi <joeyli.kernel@gmail.com>2014-09-04 03:13:39 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-09-08 09:38:41 -0400
commit9389f46e9782ea5e56fbd7b2e59ba7c08f3ba86b (patch)
treef3221dc16182f9dc090f3d85c3e41e45181bbe9a /drivers/acpi
parent2ce7598c9a453e0acd0e07be7be3f5eb39608ebd (diff)
ACPI / RTC: Fix CMOS RTC opregion handler accesses to wrong addresses
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: Lee, Chun-Yi <jlee@suse.com> Cc: 3.11+ <stable@vger.kernel.org> # 3.11+ Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/acpi_cmos_rtc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/acpi_cmos_rtc.c b/drivers/acpi/acpi_cmos_rtc.c
index 2da8660262e5..81dc75033f15 100644
--- a/drivers/acpi/acpi_cmos_rtc.c
+++ b/drivers/acpi/acpi_cmos_rtc.c
@@ -33,7 +33,7 @@ acpi_cmos_rtc_space_handler(u32 function, acpi_physical_address address,
33 void *handler_context, void *region_context) 33 void *handler_context, void *region_context)
34{ 34{
35 int i; 35 int i;
36 u8 *value = (u8 *)&value64; 36 u8 *value = (u8 *)value64;
37 37
38 if (address > 0xff || !value64) 38 if (address > 0xff || !value64)
39 return AE_BAD_PARAMETER; 39 return AE_BAD_PARAMETER;