[PATCH] [1/5] Only do century BCD conversion when we know the RTC is BCD

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <tglx@...>, <mingo@...>, <linux-kernel@...>
Date: Saturday, February 9, 2008 - 11:16 am

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 {
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] [1/5] Only do century BCD conversion when we know th..., Andi Kleen, (Sat Feb 9, 11:16 am)
[PATCH] [4/5] Fix wrong comment, Andi Kleen, (Sat Feb 9, 11:17 am)
Re: [PATCH] [3/5] Add warning when RTC clock reports binary , Thomas Gleixner, (Sat Feb 16, 3:38 pm)
[PATCH] [2/5] Use 2000 offset for 32bit kernels, Andi Kleen, (Sat Feb 9, 11:16 am)
Re: [PATCH] [2/5] Use 2000 offset for 32bit kernels, Thomas Gleixner, (Sat Feb 16, 3:24 pm)
Re: [PATCH] [2/5] Use 2000 offset for 32bit kernels, Thomas Gleixner, (Wed Feb 20, 6:07 am)
Re: [PATCH] [2/5] Use 2000 offset for 32bit kernels, Andi Kleen, (Wed Feb 20, 6:23 am)