summaryrefslogtreecommitdiffstats
path: root/arch/sparc64
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2006-03-02 20:28:34 -0800
committerDavid S. Miller <davem@sunset.davemloft.net>2006-03-20 01:14:15 -0800
commitc4f8ef77f941e7d89a52fad1fbe04d59397e2bd1 (patch)
tree7c76d66a096913f47918f755763e48ef2b00907d /arch/sparc64
parent8bcd17411643beb9a601e032d0cf1016909a81d3 (diff)
downloadop-kernel-dev-c4f8ef77f941e7d89a52fad1fbe04d59397e2bd1.zip
op-kernel-dev-c4f8ef77f941e7d89a52fad1fbe04d59397e2bd1.tar.gz
[SPARC64]: Fix mini RTC driver reading.
Need to subtract 1900 from year and 1 from month before giving it back to userspace. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64')
-rw-r--r--arch/sparc64/kernel/time.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c
index d50ebea..7d61f1b 100644
--- a/arch/sparc64/kernel/time.c
+++ b/arch/sparc64/kernel/time.c
@@ -1363,6 +1363,8 @@ static inline void mini_get_rtc_time(struct rtc_time *time)
spin_unlock_irqrestore(&rtc_lock, flags);
to_tm(seconds, time);
+ time->tm_year -= 1900;
+ time->tm_mon -= 1;
}
static inline int mini_set_rtc_time(struct rtc_time *time)
OpenPOWER on IntegriCloud