lkml.org 
[lkml]   [2008]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] [1/5] Only do century BCD conversion when we know the RTC is BCD
Date

Minor logic fix. The century change was previously always BCD,
even when the CMOS data would report itself not being BCD.

Signed-off-by: Andi Kleen <ak@suse.de>

---
arch/x86/kernel/rtc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux/arch/x86/kernel/rtc.c
===================================================================
--- linux.orig/arch/x86/kernel/rtc.c
+++ linux/arch/x86/kernel/rtc.c
@@ -130,10 +130,10 @@ unsigned long mach_get_cmos_time(void)
BCD_TO_BIN(day);
BCD_TO_BIN(mon);
BCD_TO_BIN(year);
+ BCD_TO_BIN(century);
}

if (century) {
- BCD_TO_BIN(century);
year += century * 100;
printk(KERN_INFO "Extended CMOS year: %d\n", century * 100);
} else {

\
 
 \ /
  Last update: 2008-02-09 16:19    [W:0.069 / U:3.076 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site