drivers/rtc: Provide y2038 safe rtc_class_ops.set_mmss() replacement
authorXunlei Pang <pang.xunlei@linaro.org>
Thu, 2 Apr 2015 03:34:27 +0000 (20:34 -0700)
committerIngo Molnar <mingo@kernel.org>
Fri, 3 Apr 2015 06:18:24 +0000 (08:18 +0200)
commit8e4ff1a81aa91d12856287c7103d0301ac91351a
treecf42bb0295c0e6accd4453645573fa625c3e64ce
parentcb850717b076d979058d52529e15f1736359d811
drivers/rtc: Provide y2038 safe rtc_class_ops.set_mmss() replacement

Currently the rtc_class_op's set_mmss() function takes a 32-bit
second value (on 32-bit systems), which is problematic for dates
past y2038.

This patch provides a safe version named set_mmss64() using
y2038 safe time64_t.

After this patch, set_mmss() is deprecated and all its users
will be fixed to use set_mmss64(), it can be removed when having
no users.

Signed-off-by: Xunlei Pang <pang.xunlei@linaro.org>
[jstultz: Add whitespace fix for checkpatch]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1427945681-29972-8-git-send-email-john.stultz@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
drivers/rtc/interface.c
drivers/rtc/systohc.c
include/linux/rtc.h