Commit f6a2298c5fd1f074aa3626febea33f48cd3b5a94

Authored by Adrian Bunk
Committed by Linus Torvalds
1 parent 02112dbc92

mn10300: use bcd2bin/bin2bcd

Change mn10300 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>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 1 changed file with 3 additions and 3 deletions Side-by-side Diff

arch/mn10300/kernel/rtc.c
... ... @@ -67,7 +67,7 @@
67 67  
68 68 cmos_minutes = CMOS_READ(RTC_MINUTES);
69 69 if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD)
70   - BCD_TO_BIN(cmos_minutes);
  70 + cmos_minutes = bcd2bin(cmos_minutes);
71 71  
72 72 /*
73 73 * since we're only adjusting minutes and seconds,
... ... @@ -84,8 +84,8 @@
84 84  
85 85 if (abs(real_minutes - cmos_minutes) < 30) {
86 86 if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) {
87   - BIN_TO_BCD(real_seconds);
88   - BIN_TO_BCD(real_minutes);
  87 + real_seconds = bin2bcd(real_seconds);
  88 + real_minutes = bin2bcd(real_minutes);
89 89 }
90 90 CMOS_WRITE(real_seconds, RTC_SECONDS);
91 91 CMOS_WRITE(real_minutes, RTC_MINUTES);