aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/dec
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/dec
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/dec')
-rw-r--r--arch/mips/dec/time.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/mips/dec/time.c b/arch/mips/dec/time.c
index 3965fda94a89..1359c03ded51 100644
--- a/arch/mips/dec/time.c
+++ b/arch/mips/dec/time.c
@@ -45,12 +45,12 @@ unsigned long read_persistent_clock(void)
45 spin_unlock_irqrestore(&rtc_lock, flags); 45 spin_unlock_irqrestore(&rtc_lock, flags);
46 46
47 if (!(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY) || RTC_ALWAYS_BCD) { 47 if (!(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY) || RTC_ALWAYS_BCD) {
48 sec = BCD2BIN(sec); 48 sec = bcd2bin(sec);
49 min = BCD2BIN(min); 49 min = bcd2bin(min);
50 hour = BCD2BIN(hour); 50 hour = bcd2bin(hour);
51 day = BCD2BIN(day); 51 day = bcd2bin(day);
52 mon = BCD2BIN(mon); 52 mon = bcd2bin(mon);
53 year = BCD2BIN(year); 53 year = bcd2bin(year);
54 } 54 }
55 55
56 year += real_year - 72 + 2000; 56 year += real_year - 72 + 2000;
@@ -83,7 +83,7 @@ int rtc_mips_set_mmss(unsigned long nowtime)
83 83
84 cmos_minutes = CMOS_READ(RTC_MINUTES); 84 cmos_minutes = CMOS_READ(RTC_MINUTES);
85 if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) 85 if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD)
86 cmos_minutes = BCD2BIN(cmos_minutes); 86 cmos_minutes = bcd2bin(cmos_minutes);
87 87
88 /* 88 /*
89 * since we're only adjusting minutes and seconds, 89 * since we're only adjusting minutes and seconds,
@@ -99,8 +99,8 @@ int rtc_mips_set_mmss(unsigned long nowtime)
99 99
100 if (abs(real_minutes - cmos_minutes) < 30) { 100 if (abs(real_minutes - cmos_minutes) < 30) {
101 if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) { 101 if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) {
102 real_seconds = BIN2BCD(real_seconds); 102 real_seconds = bin2bcd(real_seconds);
103 real_minutes = BIN2BCD(real_minutes); 103 real_minutes = bin2bcd(real_minutes);
104 } 104 }
105 CMOS_WRITE(real_seconds, RTC_SECONDS); 105 CMOS_WRITE(real_seconds, RTC_SECONDS);
106 CMOS_WRITE(real_minutes, RTC_MINUTES); 106 CMOS_WRITE(real_minutes, RTC_MINUTES);