]> err.no Git - linux-2.6/commitdiff
[PATCH] RTC: Fix up some RTC whitespace and style
authorMatt Mackall <mpm@selenic.com>
Tue, 28 Mar 2006 09:56:09 +0000 (01:56 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 28 Mar 2006 17:16:01 +0000 (09:16 -0800)
Fix up some RTC whitespace and style

Signed-off-by: Matt Mackall <mpm@selenic.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/ppc/platforms/chrp_time.c
arch/sh/boards/mpc1211/rtc.c
include/asm-i386/mach-default/mach_time.h

index e103a36e11a55beae09ebf70bade7f1efda2d5cd..51e06ad661687e292d6c10953e86096b3318865e 100644 (file)
@@ -129,16 +129,18 @@ unsigned long chrp_get_rtc_time(void)
                year = chrp_cmos_clock_read(RTC_YEAR);
        } while (sec != chrp_cmos_clock_read(RTC_SECONDS));
 
-       if (!(chrp_cmos_clock_read(RTC_CONTROL) & RTC_DM_BINARY) || RTC_ALWAYS_BCD)
-         {
-           BCD_TO_BIN(sec);
-           BCD_TO_BIN(min);
-           BCD_TO_BIN(hour);
-           BCD_TO_BIN(day);
-           BCD_TO_BIN(mon);
-           BCD_TO_BIN(year);
-         }
-       if ((year += 1900) < 1970)
+       if (!(chrp_cmos_clock_read(RTC_CONTROL) & RTC_DM_BINARY)
+           || RTC_ALWAYS_BCD) {
+               BCD_TO_BIN(sec);
+               BCD_TO_BIN(min);
+               BCD_TO_BIN(hour);
+               BCD_TO_BIN(day);
+               BCD_TO_BIN(mon);
+               BCD_TO_BIN(year);
+       }
+
+       year += 1900;
+       if (year < 1970)
                year += 100;
        return mktime(year, mon, day, hour, min, sec);
 }
index 76aab46e59a054e289373ab51f324ef91413ec12..8ae2dc11d8e56a38147628d235811c43a660f70c 100644 (file)
@@ -34,18 +34,21 @@ unsigned long get_cmos_time(void)
                year = CMOS_READ(RTC_YEAR);
        } while (sec != CMOS_READ(RTC_SECONDS));
 
-       if (!(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY) || RTC_ALWAYS_BCD)
-         {
-           BCD_TO_BIN(sec);
-           BCD_TO_BIN(min);
-           BCD_TO_BIN(hour);
-           BCD_TO_BIN(day);
-           BCD_TO_BIN(mon);
-           BCD_TO_BIN(year);
-         }
+       if (!(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY) || RTC_ALWAYS_BCD) {
+               BCD_TO_BIN(sec);
+               BCD_TO_BIN(min);
+               BCD_TO_BIN(hour);
+               BCD_TO_BIN(day);
+               BCD_TO_BIN(mon);
+               BCD_TO_BIN(year);
+       }
+
        spin_unlock(&rtc_lock);
-       if ((year += 1900) < 1970)
+
+       year += 1900;
+       if (year < 1970)
                year += 100;
+
        return mktime(year, mon, day, hour, min, sec);
 }
 
index ff03cf0fdc3c68156f7eef5a3d930bb2e72915f1..31eb5de6f3dc7d285baed0f69d6daadcfada178c 100644 (file)
@@ -92,16 +92,17 @@ static inline unsigned long mach_get_cmos_time(void)
                year = CMOS_READ(RTC_YEAR);
        } while (sec != CMOS_READ(RTC_SECONDS));
 
-       if (!(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY) || RTC_ALWAYS_BCD)
-         {
-           BCD_TO_BIN(sec);
-           BCD_TO_BIN(min);
-           BCD_TO_BIN(hour);
-           BCD_TO_BIN(day);
-           BCD_TO_BIN(mon);
-           BCD_TO_BIN(year);
-         }
-       if ((year += 1900) < 1970)
+       if (!(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY) || RTC_ALWAYS_BCD) {
+               BCD_TO_BIN(sec);
+               BCD_TO_BIN(min);
+               BCD_TO_BIN(hour);
+               BCD_TO_BIN(day);
+               BCD_TO_BIN(mon);
+               BCD_TO_BIN(year);
+       }
+
+       year += 1900;
+       if (year < 1970)
                year += 100;
 
        return mktime(year, mon, day, hour, min, sec);