diff options
author | Adrian Bunk <bunk@kernel.org> | 2008-10-18 23:28:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-20 11:52:41 -0400 |
commit | 18b1bd054991266d19413e155e371b5e25c98cb7 (patch) | |
tree | 210fc67d517c612e2c015a0945df8792c3e843a4 /arch/alpha/kernel/time.c | |
parent | ab527d75787c16114bcf2bc1b98bef18c67bb57c (diff) |
alpha: use bcd2bin/bin2bcd
Change alpha 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: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/alpha/kernel/time.c')
-rw-r--r-- | arch/alpha/kernel/time.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/alpha/kernel/time.c b/arch/alpha/kernel/time.c index 75480cab0893..e6a231435cba 100644 --- a/arch/alpha/kernel/time.c +++ b/arch/alpha/kernel/time.c | |||
@@ -346,12 +346,12 @@ time_init(void) | |||
346 | year = CMOS_READ(RTC_YEAR); | 346 | year = CMOS_READ(RTC_YEAR); |
347 | 347 | ||
348 | if (!(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY) || RTC_ALWAYS_BCD) { | 348 | if (!(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY) || RTC_ALWAYS_BCD) { |
349 | BCD_TO_BIN(sec); | 349 | sec = bcd2bin(sec); |
350 | BCD_TO_BIN(min); | 350 | min = bcd2bin(min); |
351 | BCD_TO_BIN(hour); | 351 | hour = bcd2bin(hour); |
352 | BCD_TO_BIN(day); | 352 | day = bcd2bin(day); |
353 | BCD_TO_BIN(mon); | 353 | mon = bcd2bin(mon); |
354 | BCD_TO_BIN(year); | 354 | year = bcd2bin(year); |
355 | } | 355 | } |
356 | 356 | ||
357 | /* PC-like is standard; used for year >= 70 */ | 357 | /* PC-like is standard; used for year >= 70 */ |
@@ -525,7 +525,7 @@ set_rtc_mmss(unsigned long nowtime) | |||
525 | 525 | ||
526 | cmos_minutes = CMOS_READ(RTC_MINUTES); | 526 | cmos_minutes = CMOS_READ(RTC_MINUTES); |
527 | if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) | 527 | if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) |
528 | BCD_TO_BIN(cmos_minutes); | 528 | cmos_minutes = bcd2bin(cmos_minutes); |
529 | 529 | ||
530 | /* | 530 | /* |
531 | * since we're only adjusting minutes and seconds, | 531 | * since we're only adjusting minutes and seconds, |
@@ -543,8 +543,8 @@ set_rtc_mmss(unsigned long nowtime) | |||
543 | 543 | ||
544 | if (abs(real_minutes - cmos_minutes) < 30) { | 544 | if (abs(real_minutes - cmos_minutes) < 30) { |
545 | if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) { | 545 | if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) { |
546 | BIN_TO_BCD(real_seconds); | 546 | real_seconds = bin2bcd(real_seconds); |
547 | BIN_TO_BCD(real_minutes); | 547 | real_minutes = bin2bcd(real_minutes); |
548 | } | 548 | } |
549 | CMOS_WRITE(real_seconds,RTC_SECONDS); | 549 | CMOS_WRITE(real_seconds,RTC_SECONDS); |
550 | CMOS_WRITE(real_minutes,RTC_MINUTES); | 550 | CMOS_WRITE(real_minutes,RTC_MINUTES); |