diff options
author | Matt Mackall <mpm@selenic.com> | 2006-03-28 04:56:09 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-28 12:16:01 -0500 |
commit | 41623b064fbd76de5901da7c0e3cd2136617d787 (patch) | |
tree | f96bb5c45d7fa4a899af2be27a3bbdca079b023a /arch/sh | |
parent | 4c2e6f6a06cdd239ec17e195e7868ce0171ea154 (diff) |
[PATCH] RTC: Fix up some RTC whitespace and style
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>
Diffstat (limited to 'arch/sh')
-rw-r--r-- | arch/sh/boards/mpc1211/rtc.c | 23 |
1 files changed, 13 insertions, 10 deletions
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) | |||
34 | year = CMOS_READ(RTC_YEAR); | 34 | year = CMOS_READ(RTC_YEAR); |
35 | } while (sec != CMOS_READ(RTC_SECONDS)); | 35 | } while (sec != CMOS_READ(RTC_SECONDS)); |
36 | 36 | ||
37 | if (!(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY) || RTC_ALWAYS_BCD) | 37 | if (!(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY) || RTC_ALWAYS_BCD) { |
38 | { | 38 | BCD_TO_BIN(sec); |
39 | BCD_TO_BIN(sec); | 39 | BCD_TO_BIN(min); |
40 | BCD_TO_BIN(min); | 40 | BCD_TO_BIN(hour); |
41 | BCD_TO_BIN(hour); | 41 | BCD_TO_BIN(day); |
42 | BCD_TO_BIN(day); | 42 | BCD_TO_BIN(mon); |
43 | BCD_TO_BIN(mon); | 43 | BCD_TO_BIN(year); |
44 | BCD_TO_BIN(year); | 44 | } |
45 | } | 45 | |
46 | spin_unlock(&rtc_lock); | 46 | spin_unlock(&rtc_lock); |
47 | if ((year += 1900) < 1970) | 47 | |
48 | year += 1900; | ||
49 | if (year < 1970) | ||
48 | year += 100; | 50 | year += 100; |
51 | |||
49 | return mktime(year, mon, day, hour, min, sec); | 52 | return mktime(year, mon, day, hour, min, sec); |
50 | } | 53 | } |
51 | 54 | ||