From 41623b064fbd76de5901da7c0e3cd2136617d787 Mon Sep 17 00:00:00 2001 From: Matt Mackall Date: Tue, 28 Mar 2006 01:56:09 -0800 Subject: [PATCH] RTC: Fix up some RTC whitespace and style Fix up some RTC whitespace and style Signed-off-by: Matt Mackall Cc: Alessandro Zummo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/sh/boards/mpc1211/rtc.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'arch/sh/boards') diff --git a/arch/sh/boards/mpc1211/rtc.c b/arch/sh/boards/mpc1211/rtc.c index 76aab46e59a0..8ae2dc11d8e5 100644 --- a/arch/sh/boards/mpc1211/rtc.c +++ b/arch/sh/boards/mpc1211/rtc.c @@ -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); } -- cgit v1.2.3