diff options
Diffstat (limited to 'arch/x86/kernel/rtc.c')
-rw-r--r-- | arch/x86/kernel/rtc.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/x86/kernel/rtc.c b/arch/x86/kernel/rtc.c index d2569513ad4c..d4d8277e890e 100644 --- a/arch/x86/kernel/rtc.c +++ b/arch/x86/kernel/rtc.c | |||
@@ -94,7 +94,7 @@ int mach_set_rtc_mmss(unsigned long nowtime) | |||
94 | 94 | ||
95 | unsigned long mach_get_cmos_time(void) | 95 | unsigned long mach_get_cmos_time(void) |
96 | { | 96 | { |
97 | unsigned int year, mon, day, hour, min, sec, century = 0; | 97 | unsigned int status, year, mon, day, hour, min, sec, century = 0; |
98 | 98 | ||
99 | /* | 99 | /* |
100 | * If UIP is clear, then we have >= 244 microseconds before | 100 | * If UIP is clear, then we have >= 244 microseconds before |
@@ -119,7 +119,10 @@ unsigned long mach_get_cmos_time(void) | |||
119 | century = CMOS_READ(acpi_gbl_FADT.century); | 119 | century = CMOS_READ(acpi_gbl_FADT.century); |
120 | #endif | 120 | #endif |
121 | 121 | ||
122 | if (RTC_ALWAYS_BCD || !(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY)) { | 122 | status = CMOS_READ(RTC_CONTROL); |
123 | WARN_ON_ONCE((RTC_ALWAYS_BCD && (status & RTC_DM_BINARY)); | ||
124 | |||
125 | if (RTC_ALWAYS_BCD || !(status & RTC_DM_BINARY)) { | ||
123 | BCD_TO_BIN(sec); | 126 | BCD_TO_BIN(sec); |
124 | BCD_TO_BIN(min); | 127 | BCD_TO_BIN(min); |
125 | BCD_TO_BIN(hour); | 128 | BCD_TO_BIN(hour); |