Skip to content

Commit

Permalink
mn10300: use bcd2bin/bin2bcd
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: David Howells <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
AdrianBunk authored and torvalds committed Oct 20, 2008
1 parent 02112db commit f6a2298
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arch/mn10300/kernel/rtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ static int set_rtc_mmss(unsigned long nowtime)

cmos_minutes = CMOS_READ(RTC_MINUTES);
if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD)
BCD_TO_BIN(cmos_minutes);
cmos_minutes = bcd2bin(cmos_minutes);

/*
* since we're only adjusting minutes and seconds,
Expand All @@ -84,8 +84,8 @@ static int set_rtc_mmss(unsigned long nowtime)

if (abs(real_minutes - cmos_minutes) < 30) {
if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) {
BIN_TO_BCD(real_seconds);
BIN_TO_BCD(real_minutes);
real_seconds = bin2bcd(real_seconds);
real_minutes = bin2bcd(real_minutes);
}
CMOS_WRITE(real_seconds, RTC_SECONDS);
CMOS_WRITE(real_minutes, RTC_MINUTES);
Expand Down

0 comments on commit f6a2298

Please sign in to comment.