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/pmc-sierra | |
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/pmc-sierra')
-rw-r--r-- | arch/mips/pmc-sierra/yosemite/setup.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/mips/pmc-sierra/yosemite/setup.c b/arch/mips/pmc-sierra/yosemite/setup.c index 56bf69595da8..015fcc363dc0 100644 --- a/arch/mips/pmc-sierra/yosemite/setup.c +++ b/arch/mips/pmc-sierra/yosemite/setup.c | |||
@@ -100,8 +100,12 @@ int rtc_mips_set_time(unsigned long tim) | |||
100 | struct rtc_time tm; | 100 | struct rtc_time tm; |
101 | unsigned long flags; | 101 | unsigned long flags; |
102 | 102 | ||
103 | /* convert to a more useful format -- note months count from 0 */ | 103 | /* |
104 | to_tm(sec, &tm); | 104 | * Convert to a more useful format -- note months count from 0 |
105 | * and years from 1900 | ||
106 | */ | ||
107 | rtc_time_to_tm(tim, &tm); | ||
108 | tm.tm_year += 1900; | ||
105 | tm.tm_mon += 1; | 109 | tm.tm_mon += 1; |
106 | 110 | ||
107 | spin_lock_irqsave(&rtc_lock, flags); | 111 | spin_lock_irqsave(&rtc_lock, flags); |