aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/include/asm/mc146818-time.h
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@kernel.org>2008-10-18 23:28:44 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-20 11:52:41 -0400
commit02112dbc925f664bc4d24ff098686b9d21bfbfb1 (patch)
tree9ff51ea5a819ad3d828563d96121e5544b7b8eba /arch/mips/include/asm/mc146818-time.h
parente232cfdc3d087d435c9ee767ddd4e6f52457d02a (diff)
mips: use bcd2bin/bin2bcd
Changes mips to use the new bcd2bin/bin2bcd functions instead of the obsolete BCD_TO_BIN/BIN_TO_BCD/BCD2BIN/BIN2BCD macros. Signed-off-by: Adrian Bunk <bunk@kernel.org> Cc: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/mips/include/asm/mc146818-time.h')
-rw-r--r--arch/mips/include/asm/mc146818-time.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/mips/include/asm/mc146818-time.h b/arch/mips/include/asm/mc146818-time.h
index cdc379a0a94e..199b45733a95 100644
--- a/arch/mips/include/asm/mc146818-time.h
+++ b/arch/mips/include/asm/mc146818-time.h
@@ -44,7 +44,7 @@ static inline int mc146818_set_rtc_mmss(unsigned long nowtime)
44 44
45 cmos_minutes = CMOS_READ(RTC_MINUTES); 45 cmos_minutes = CMOS_READ(RTC_MINUTES);
46 if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) 46 if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD)
47 BCD_TO_BIN(cmos_minutes); 47 cmos_minutes = bcd2bin(cmos_minutes);
48 48
49 /* 49 /*
50 * since we're only adjusting minutes and seconds, 50 * since we're only adjusting minutes and seconds,
@@ -60,8 +60,8 @@ static inline int mc146818_set_rtc_mmss(unsigned long nowtime)
60 60
61 if (abs(real_minutes - cmos_minutes) < 30) { 61 if (abs(real_minutes - cmos_minutes) < 30) {
62 if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) { 62 if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) {
63 BIN_TO_BCD(real_seconds); 63 real_seconds = bin2bcd(real_seconds);
64 BIN_TO_BCD(real_minutes); 64 real_minutes = bin2bcd(real_minutes);
65 } 65 }
66 CMOS_WRITE(real_seconds, RTC_SECONDS); 66 CMOS_WRITE(real_seconds, RTC_SECONDS);
67 CMOS_WRITE(real_minutes, RTC_MINUTES); 67 CMOS_WRITE(real_minutes, RTC_MINUTES);
@@ -103,12 +103,12 @@ static inline unsigned long mc146818_get_cmos_time(void)
103 } while (sec != CMOS_READ(RTC_SECONDS)); 103 } while (sec != CMOS_READ(RTC_SECONDS));
104 104
105 if (!(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY) || RTC_ALWAYS_BCD) { 105 if (!(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY) || RTC_ALWAYS_BCD) {
106 BCD_TO_BIN(sec); 106 sec = bcd2bin(sec);
107 BCD_TO_BIN(min); 107 min = bcd2bin(min);
108 BCD_TO_BIN(hour); 108 hour = bcd2bin(hour);
109 BCD_TO_BIN(day); 109 day = bcd2bin(day);
110 BCD_TO_BIN(mon); 110 mon = bcd2bin(mon);
111 BCD_TO_BIN(year); 111 year = bcd2bin(year);
112 } 112 }
113 spin_unlock_irqrestore(&rtc_lock, flags); 113 spin_unlock_irqrestore(&rtc_lock, flags);
114 year = mc146818_decode_year(year); 114 year = mc146818_decode_year(year);