summaryrefslogtreecommitdiffstats
path: root/arch/mips/sibyte/swarm/rtc_m41t81.c
diff options
context:
space:
mode:
authorRalf Baechle2007-10-12 00:46:09 +0200
committerRalf Baechle2007-10-12 00:46:09 +0200
commit90b02340dcc6ce00bf22c48f4865915f5989e5e4 (patch)
tree763f07fe0025ac5cd54fa361ec5d77ad76b5547c /arch/mips/sibyte/swarm/rtc_m41t81.c
parent[MIPS] Deforest the function pointer jungle in the time code. (diff)
downloadkernel-qcow2-linux-90b02340dcc6ce00bf22c48f4865915f5989e5e4.tar.gz
kernel-qcow2-linux-90b02340dcc6ce00bf22c48f4865915f5989e5e4.tar.xz
kernel-qcow2-linux-90b02340dcc6ce00bf22c48f4865915f5989e5e4.zip
[MIPS] Switch from to_tm to rtc_time_to_tm
This replaces the MIPS-specific to_tm function with the generic rtc_time_to_tm function. The big difference between the two functions is that rtc_time_to_tm uses epoch 70 while to_tm uses 1970, so the result of rtc_time_to_tm needs to be fixed up. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/sibyte/swarm/rtc_m41t81.c')
-rw-r--r--arch/mips/sibyte/swarm/rtc_m41t81.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/mips/sibyte/swarm/rtc_m41t81.c b/arch/mips/sibyte/swarm/rtc_m41t81.c
index c13914bdda59..26fbff4c15b1 100644
--- a/arch/mips/sibyte/swarm/rtc_m41t81.c
+++ b/arch/mips/sibyte/swarm/rtc_m41t81.c
@@ -146,7 +146,8 @@ int m41t81_set_time(unsigned long t)
struct rtc_time tm;
unsigned long flags;
- to_tm(t, &tm);
+ /* Note we don't care about the century */
+ rtc_time_to_tm(t, &tm);
/*
* Note the write order matters as it ensures the correctness.