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 | |
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')
-rw-r--r-- | arch/alpha/kernel/core_marvel.c | 4 | ||||
-rw-r--r-- | arch/alpha/kernel/time.c | 18 |
2 files changed, 11 insertions, 11 deletions
diff --git a/arch/alpha/kernel/core_marvel.c b/arch/alpha/kernel/core_marvel.c index 04dcc5e5d4c1..9cd8dca742a7 100644 --- a/arch/alpha/kernel/core_marvel.c +++ b/arch/alpha/kernel/core_marvel.c | |||
@@ -655,7 +655,7 @@ __marvel_rtc_io(u8 b, unsigned long addr, int write) | |||
655 | 655 | ||
656 | case 0x71: /* RTC_PORT(1) */ | 656 | case 0x71: /* RTC_PORT(1) */ |
657 | rtc_access.index = index; | 657 | rtc_access.index = index; |
658 | rtc_access.data = BCD_TO_BIN(b); | 658 | rtc_access.data = bcd2bin(b); |
659 | rtc_access.function = 0x48 + !write; /* GET/PUT_TOY */ | 659 | rtc_access.function = 0x48 + !write; /* GET/PUT_TOY */ |
660 | 660 | ||
661 | #ifdef CONFIG_SMP | 661 | #ifdef CONFIG_SMP |
@@ -668,7 +668,7 @@ __marvel_rtc_io(u8 b, unsigned long addr, int write) | |||
668 | #else | 668 | #else |
669 | __marvel_access_rtc(&rtc_access); | 669 | __marvel_access_rtc(&rtc_access); |
670 | #endif | 670 | #endif |
671 | ret = BIN_TO_BCD(rtc_access.data); | 671 | ret = bin2bcd(rtc_access.data); |
672 | break; | 672 | break; |
673 | 673 | ||
674 | default: | 674 | default: |
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); |