diff options
Diffstat (limited to 'arch/cris/kernel/time.c')
-rw-r--r-- | arch/cris/kernel/time.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/cris/kernel/time.c b/arch/cris/kernel/time.c index ff4c6aa75def..074fe7dea96b 100644 --- a/arch/cris/kernel/time.c +++ b/arch/cris/kernel/time.c | |||
@@ -127,7 +127,7 @@ int set_rtc_mmss(unsigned long nowtime) | |||
127 | return 0; | 127 | return 0; |
128 | 128 | ||
129 | cmos_minutes = CMOS_READ(RTC_MINUTES); | 129 | cmos_minutes = CMOS_READ(RTC_MINUTES); |
130 | BCD_TO_BIN(cmos_minutes); | 130 | cmos_minutes = bcd2bin(cmos_minutes); |
131 | 131 | ||
132 | /* | 132 | /* |
133 | * since we're only adjusting minutes and seconds, | 133 | * since we're only adjusting minutes and seconds, |
@@ -142,8 +142,8 @@ int set_rtc_mmss(unsigned long nowtime) | |||
142 | real_minutes %= 60; | 142 | real_minutes %= 60; |
143 | 143 | ||
144 | if (abs(real_minutes - cmos_minutes) < 30) { | 144 | if (abs(real_minutes - cmos_minutes) < 30) { |
145 | BIN_TO_BCD(real_seconds); | 145 | real_seconds = bin2bcd(real_seconds); |
146 | BIN_TO_BCD(real_minutes); | 146 | real_minutes = bin2bcd(real_minutes); |
147 | CMOS_WRITE(real_seconds,RTC_SECONDS); | 147 | CMOS_WRITE(real_seconds,RTC_SECONDS); |
148 | CMOS_WRITE(real_minutes,RTC_MINUTES); | 148 | CMOS_WRITE(real_minutes,RTC_MINUTES); |
149 | } else { | 149 | } else { |
@@ -170,12 +170,12 @@ get_cmos_time(void) | |||
170 | mon = CMOS_READ(RTC_MONTH); | 170 | mon = CMOS_READ(RTC_MONTH); |
171 | year = CMOS_READ(RTC_YEAR); | 171 | year = CMOS_READ(RTC_YEAR); |
172 | 172 | ||
173 | BCD_TO_BIN(sec); | 173 | sec = bcd2bin(sec); |
174 | BCD_TO_BIN(min); | 174 | min = bcd2bin(min); |
175 | BCD_TO_BIN(hour); | 175 | hour = bcd2bin(hour); |
176 | BCD_TO_BIN(day); | 176 | day = bcd2bin(day); |
177 | BCD_TO_BIN(mon); | 177 | mon = bcd2bin(mon); |
178 | BCD_TO_BIN(year); | 178 | year = bcd2bin(year); |
179 | 179 | ||
180 | if ((year += 1900) < 1970) | 180 | if ((year += 1900) < 1970) |
181 | year += 100; | 181 | year += 100; |