aboutsummaryrefslogtreecommitdiffstats
path: root/arch/cris/kernel/time.c
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@kernel.org>2008-10-18 23:28:40 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-20 11:52:41 -0400
commit4110a0d6206bd175419cc5503f80cc296d184cbf (patch)
tree77dae44b9dc20d1fd997692eefc13c3e247af657 /arch/cris/kernel/time.c
parent18b1bd054991266d19413e155e371b5e25c98cb7 (diff)
cris: use bcd2bin/bin2bcd
Change cris to use the new bcd2bin/bin2bcd functions instead of the obsolete BCD_TO_BIN/BIN_TO_BCD macros. Signed-off-by: Adrian Bunk <bunk@kernel.org> Cc: Chris Zankel <zankel@tensilica.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/cris/kernel/time.c')
-rw-r--r--arch/cris/kernel/time.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/cris/kernel/time.c b/arch/cris/kernel/time.c
index ff4c6aa75def..074fe7dea96b 100644
--- a/arch/cris/kernel/time.c
+++ b/arch/cris/kernel/time.c
@@ -127,7 +127,7 @@ int set_rtc_mmss(unsigned long nowtime)
127 return 0; 127 return 0;
128 128
129 cmos_minutes = CMOS_READ(RTC_MINUTES); 129 cmos_minutes = CMOS_READ(RTC_MINUTES);
130 BCD_TO_BIN(cmos_minutes); 130 cmos_minutes = bcd2bin(cmos_minutes);
131 131
132 /* 132 /*
133 * since we're only adjusting minutes and seconds, 133 * since we're only adjusting minutes and seconds,
@@ -142,8 +142,8 @@ int set_rtc_mmss(unsigned long nowtime)
142 real_minutes %= 60; 142 real_minutes %= 60;
143 143
144 if (abs(real_minutes - cmos_minutes) < 30) { 144 if (abs(real_minutes - cmos_minutes) < 30) {
145 BIN_TO_BCD(real_seconds); 145 real_seconds = bin2bcd(real_seconds);
146 BIN_TO_BCD(real_minutes); 146 real_minutes = bin2bcd(real_minutes);
147 CMOS_WRITE(real_seconds,RTC_SECONDS); 147 CMOS_WRITE(real_seconds,RTC_SECONDS);
148 CMOS_WRITE(real_minutes,RTC_MINUTES); 148 CMOS_WRITE(real_minutes,RTC_MINUTES);
149 } else { 149 } else {
@@ -170,12 +170,12 @@ get_cmos_time(void)
170 mon = CMOS_READ(RTC_MONTH); 170 mon = CMOS_READ(RTC_MONTH);
171 year = CMOS_READ(RTC_YEAR); 171 year = CMOS_READ(RTC_YEAR);
172 172
173 BCD_TO_BIN(sec); 173 sec = bcd2bin(sec);
174 BCD_TO_BIN(min); 174 min = bcd2bin(min);
175 BCD_TO_BIN(hour); 175 hour = bcd2bin(hour);
176 BCD_TO_BIN(day); 176 day = bcd2bin(day);
177 BCD_TO_BIN(mon); 177 mon = bcd2bin(mon);
178 BCD_TO_BIN(year); 178 year = bcd2bin(year);
179 179
180 if ((year += 1900) < 1970) 180 if ((year += 1900) < 1970)
181 year += 100; 181 year += 100;