aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k/atari
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@kernel.org>2008-10-13 15:58:47 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-14 13:23:26 -0400
commit5b1d5f953bbb50dcbdf93719cb622aa128ba7527 (patch)
treed1f826b007e909bbf340498376c83a0452359af4 /arch/m68k/atari
parent4aba41ea8bdc1b475861f5e5c1649ab20251090c (diff)
m68k: use bcd2bin/bin2bcd
This patch changes m68k to use the new bcd2bin/bin2bcd functions instead of the obsolete BCD_TO_BIN/BIN_TO_BCD/BCD2BIN/BIN2BCD macros. It also remove local bcd2bin/bin2bcd implementations in favor of the global ones. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/m68k/atari')
-rw-r--r--arch/m68k/atari/time.c35
1 files changed, 18 insertions, 17 deletions
diff --git a/arch/m68k/atari/time.c b/arch/m68k/atari/time.c
index e0d3c8bfb408..e2df4a13d2bb 100644
--- a/arch/m68k/atari/time.c
+++ b/arch/m68k/atari/time.c
@@ -191,13 +191,14 @@ int atari_tt_hwclk( int op, struct rtc_time *t )
191 } 191 }
192 192
193 if (!(ctrl & RTC_DM_BINARY)) { 193 if (!(ctrl & RTC_DM_BINARY)) {
194 BIN_TO_BCD(sec); 194 sec = bin2bcd(sec);
195 BIN_TO_BCD(min); 195 min = bin2bcd(min);
196 BIN_TO_BCD(hour); 196 hour = bin2bcd(hour);
197 BIN_TO_BCD(day); 197 day = bin2bcd(day);
198 BIN_TO_BCD(mon); 198 mon = bin2bcd(mon);
199 BIN_TO_BCD(year); 199 year = bin2bcd(year);
200 if (wday >= 0) BIN_TO_BCD(wday); 200 if (wday >= 0)
201 wday = bin2bcd(wday);
201 } 202 }
202 } 203 }
203 204
@@ -252,13 +253,13 @@ int atari_tt_hwclk( int op, struct rtc_time *t )
252 } 253 }
253 254
254 if (!(ctrl & RTC_DM_BINARY)) { 255 if (!(ctrl & RTC_DM_BINARY)) {
255 BCD_TO_BIN(sec); 256 sec = bcd2bin(sec);
256 BCD_TO_BIN(min); 257 min = bcd2bin(min);
257 BCD_TO_BIN(hour); 258 hour = bcd2bin(hour);
258 BCD_TO_BIN(day); 259 day = bcd2bin(day);
259 BCD_TO_BIN(mon); 260 mon = bcd2bin(mon);
260 BCD_TO_BIN(year); 261 year = bcd2bin(year);
261 BCD_TO_BIN(wday); 262 wday = bcd2bin(wday);
262 } 263 }
263 264
264 if (!(ctrl & RTC_24H)) { 265 if (!(ctrl & RTC_24H)) {
@@ -318,7 +319,7 @@ int atari_tt_set_clock_mmss (unsigned long nowtime)
318 319
319 rtc_minutes = RTC_READ (RTC_MINUTES); 320 rtc_minutes = RTC_READ (RTC_MINUTES);
320 if (!(save_control & RTC_DM_BINARY)) 321 if (!(save_control & RTC_DM_BINARY))
321 BCD_TO_BIN (rtc_minutes); 322 rtc_minutes = bcd2bin(rtc_minutes);
322 323
323 /* Since we're only adjusting minutes and seconds, don't interfere 324 /* Since we're only adjusting minutes and seconds, don't interfere
324 with hour overflow. This avoids messing with unknown time zones 325 with hour overflow. This avoids messing with unknown time zones
@@ -329,8 +330,8 @@ int atari_tt_set_clock_mmss (unsigned long nowtime)
329 { 330 {
330 if (!(save_control & RTC_DM_BINARY)) 331 if (!(save_control & RTC_DM_BINARY))
331 { 332 {
332 BIN_TO_BCD (real_seconds); 333 real_seconds = bin2bcd(real_seconds);
333 BIN_TO_BCD (real_minutes); 334 real_minutes = bin2bcd(real_minutes);
334 } 335 }
335 RTC_WRITE (RTC_SECONDS, real_seconds); 336 RTC_WRITE (RTC_SECONDS, real_seconds);
336 RTC_WRITE (RTC_MINUTES, real_minutes); 337 RTC_WRITE (RTC_MINUTES, real_minutes);