diff options
Diffstat (limited to 'include/asm-i386')
-rw-r--r-- | include/asm-i386/mach-default/mach_time.h | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/include/asm-i386/mach-default/mach_time.h b/include/asm-i386/mach-default/mach_time.h index ff03cf0fdc3c..31eb5de6f3dc 100644 --- a/include/asm-i386/mach-default/mach_time.h +++ b/include/asm-i386/mach-default/mach_time.h | |||
@@ -92,16 +92,17 @@ static inline unsigned long mach_get_cmos_time(void) | |||
92 | year = CMOS_READ(RTC_YEAR); | 92 | year = CMOS_READ(RTC_YEAR); |
93 | } while (sec != CMOS_READ(RTC_SECONDS)); | 93 | } while (sec != CMOS_READ(RTC_SECONDS)); |
94 | 94 | ||
95 | if (!(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY) || RTC_ALWAYS_BCD) | 95 | if (!(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY) || RTC_ALWAYS_BCD) { |
96 | { | 96 | BCD_TO_BIN(sec); |
97 | BCD_TO_BIN(sec); | 97 | BCD_TO_BIN(min); |
98 | BCD_TO_BIN(min); | 98 | BCD_TO_BIN(hour); |
99 | BCD_TO_BIN(hour); | 99 | BCD_TO_BIN(day); |
100 | BCD_TO_BIN(day); | 100 | BCD_TO_BIN(mon); |
101 | BCD_TO_BIN(mon); | 101 | BCD_TO_BIN(year); |
102 | BCD_TO_BIN(year); | 102 | } |
103 | } | 103 | |
104 | if ((year += 1900) < 1970) | 104 | year += 1900; |
105 | if (year < 1970) | ||
105 | year += 100; | 106 | year += 100; |
106 | 107 | ||
107 | return mktime(year, mon, day, hour, min, sec); | 108 | return mktime(year, mon, day, hour, min, sec); |