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/sgi-ip22 | |
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/sgi-ip22')
-rw-r--r-- | arch/mips/sgi-ip22/ip22-time.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/mips/sgi-ip22/ip22-time.c b/arch/mips/sgi-ip22/ip22-time.c index 0387c385b4b2..c49418067f93 100644 --- a/arch/mips/sgi-ip22/ip22-time.c +++ b/arch/mips/sgi-ip22/ip22-time.c | |||
@@ -29,7 +29,7 @@ | |||
29 | #include <asm/sgi/ip22.h> | 29 | #include <asm/sgi/ip22.h> |
30 | 30 | ||
31 | /* | 31 | /* |
32 | * note that mktime uses month from 1 to 12 while to_tm | 32 | * Note that mktime uses month from 1 to 12 while rtc_time_to_tm |
33 | * uses 0 to 11. | 33 | * uses 0 to 11. |
34 | */ | 34 | */ |
35 | unsigned long read_persistent_clock(void) | 35 | unsigned long read_persistent_clock(void) |
@@ -66,10 +66,10 @@ int rtc_mips_set_time(unsigned long tim) | |||
66 | unsigned int save_control; | 66 | unsigned int save_control; |
67 | unsigned long flags; | 67 | unsigned long flags; |
68 | 68 | ||
69 | to_tm(tim, &tm); | 69 | rtc_time_to_tm(tim, &tm); |
70 | 70 | ||
71 | tm.tm_mon += 1; /* tm_mon starts at zero */ | 71 | tm.tm_mon += 1; /* tm_mon starts at zero */ |
72 | tm.tm_year -= 1940; | 72 | tm.tm_year -= 40; |
73 | if (tm.tm_year >= 100) | 73 | if (tm.tm_year >= 100) |
74 | tm.tm_year -= 100; | 74 | tm.tm_year -= 100; |
75 | 75 | ||