
From: Lee Revell <rlrevell@joe-job.com>

Clean up the logic in do_timer_interrupt()

Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/arch/i386/kernel/time.c |   14 +++++---------
 1 files changed, 5 insertions(+), 9 deletions(-)

diff -puN arch/i386/kernel/time.c~x86-clean-up-fixme-in-do_timer_interrupt arch/i386/kernel/time.c
--- 25/arch/i386/kernel/time.c~x86-clean-up-fixme-in-do_timer_interrupt	2005-03-07 20:41:31.000000000 -0800
+++ 25-akpm/arch/i386/kernel/time.c	2005-03-07 21:14:37.000000000 -0800
@@ -250,16 +250,12 @@ static inline void do_timer_interrupt(in
 			>= USEC_AFTER - ((unsigned) TICK_SIZE) / 2 &&
 	    (xtime.tv_nsec / 1000)
 			<= USEC_BEFORE + ((unsigned) TICK_SIZE) / 2) {
-		/* horrible...FIXME */
+	        last_rtc_update = xtime.tv_sec;
 		if (efi_enabled) {
-	 		if (efi_set_rtc_mmss(xtime.tv_sec) == 0)
-				last_rtc_update = xtime.tv_sec;
-			else
-				last_rtc_update = xtime.tv_sec - 600;
-		} else if (set_rtc_mmss(xtime.tv_sec) == 0)
-			last_rtc_update = xtime.tv_sec;
-		else
-			last_rtc_update = xtime.tv_sec - 600; /* do it again in 60 s */
+		    if (efi_set_rtc_mmss(xtime.tv_sec))
+			last_rtc_update -= 600;
+		} else if (set_rtc_mmss(xtime.tv_sec))
+			last_rtc_update -= 600;
 	}
 
 	if (MCA_bus) {
_
