diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2007-10-11 18:46:09 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2007-10-11 18:46:09 -0400 |
commit | 90b02340dcc6ce00bf22c48f4865915f5989e5e4 (patch) | |
tree | 763f07fe0025ac5cd54fa361ec5d77ad76b5547c /arch/mips/sibyte | |
parent | 4b550488f894c899aa54dc935c8fee47bca2b7df (diff) |
[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')
-rw-r--r-- | arch/mips/sibyte/swarm/rtc_m41t81.c | 3 | ||||
-rw-r--r-- | arch/mips/sibyte/swarm/rtc_xicor1241.c | 3 |
2 files changed, 4 insertions, 2 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) | |||
146 | struct rtc_time tm; | 146 | struct rtc_time tm; |
147 | unsigned long flags; | 147 | unsigned long flags; |
148 | 148 | ||
149 | to_tm(t, &tm); | 149 | /* Note we don't care about the century */ |
150 | rtc_time_to_tm(t, &tm); | ||
150 | 151 | ||
151 | /* | 152 | /* |
152 | * Note the write order matters as it ensures the correctness. | 153 | * Note the write order matters as it ensures the correctness. |
diff --git a/arch/mips/sibyte/swarm/rtc_xicor1241.c b/arch/mips/sibyte/swarm/rtc_xicor1241.c index f4a178836415..ff3e5dabb348 100644 --- a/arch/mips/sibyte/swarm/rtc_xicor1241.c +++ b/arch/mips/sibyte/swarm/rtc_xicor1241.c | |||
@@ -115,7 +115,8 @@ int xicor_set_time(unsigned long t) | |||
115 | int tmp; | 115 | int tmp; |
116 | unsigned long flags; | 116 | unsigned long flags; |
117 | 117 | ||
118 | to_tm(t, &tm); | 118 | rtc_time_to_tm(t, &tm); |
119 | tm.tm_year += 1900; | ||
119 | 120 | ||
120 | spin_lock_irqsave(&rtc_lock, flags); | 121 | spin_lock_irqsave(&rtc_lock, flags); |
121 | /* unlock writes to the CCR */ | 122 | /* unlock writes to the CCR */ |