LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] [1/3] Only do century BCD conversion when we know the RTC is BCD
@ 2008-02-08 12:14 Andi Kleen
  2008-02-08 12:14 ` [PATCH] [2/3] Use 2000 offset for 32bit kernels Andi Kleen
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Andi Kleen @ 2008-02-08 12:14 UTC (permalink / raw)
  To: mingo, tglx, linux-kernel


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 {

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-02-09 14:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-08 12:14 [PATCH] [1/3] Only do century BCD conversion when we know the RTC is BCD Andi Kleen
2008-02-08 12:14 ` [PATCH] [2/3] Use 2000 offset for 32bit kernels Andi Kleen
2008-02-08 12:14 ` [PATCH] [3/3] Enable ACPI extended century handling for 32bit too Andi Kleen
2008-02-09 10:39   ` Thomas Gleixner
2008-02-09 10:28 ` [PATCH] [1/3] Only do century BCD conversion when we know the RTC is BCD Thomas Gleixner
2008-02-09 14:55   ` Andi Kleen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).