diff options
Diffstat (limited to 'arch/x86/kernel/rtc.c')
-rw-r--r-- | arch/x86/kernel/rtc.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/arch/x86/kernel/rtc.c b/arch/x86/kernel/rtc.c index 0a23b5795b25..dd6f2b71561b 100644 --- a/arch/x86/kernel/rtc.c +++ b/arch/x86/kernel/rtc.c | |||
@@ -52,7 +52,7 @@ int mach_set_rtc_mmss(unsigned long nowtime) | |||
52 | 52 | ||
53 | cmos_minutes = CMOS_READ(RTC_MINUTES); | 53 | cmos_minutes = CMOS_READ(RTC_MINUTES); |
54 | if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) | 54 | if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) |
55 | BCD_TO_BIN(cmos_minutes); | 55 | cmos_minutes = bcd2bin(cmos_minutes); |
56 | 56 | ||
57 | /* | 57 | /* |
58 | * since we're only adjusting minutes and seconds, | 58 | * since we're only adjusting minutes and seconds, |
@@ -69,8 +69,8 @@ int mach_set_rtc_mmss(unsigned long nowtime) | |||
69 | 69 | ||
70 | if (abs(real_minutes - cmos_minutes) < 30) { | 70 | if (abs(real_minutes - cmos_minutes) < 30) { |
71 | if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) { | 71 | if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) { |
72 | BIN_TO_BCD(real_seconds); | 72 | real_seconds = bin2bcd(real_seconds); |
73 | BIN_TO_BCD(real_minutes); | 73 | real_minutes = bin2bcd(real_minutes); |
74 | } | 74 | } |
75 | CMOS_WRITE(real_seconds,RTC_SECONDS); | 75 | CMOS_WRITE(real_seconds,RTC_SECONDS); |
76 | CMOS_WRITE(real_minutes,RTC_MINUTES); | 76 | CMOS_WRITE(real_minutes,RTC_MINUTES); |
@@ -124,16 +124,16 @@ unsigned long mach_get_cmos_time(void) | |||
124 | WARN_ON_ONCE(RTC_ALWAYS_BCD && (status & RTC_DM_BINARY)); | 124 | WARN_ON_ONCE(RTC_ALWAYS_BCD && (status & RTC_DM_BINARY)); |
125 | 125 | ||
126 | if (RTC_ALWAYS_BCD || !(status & RTC_DM_BINARY)) { | 126 | if (RTC_ALWAYS_BCD || !(status & RTC_DM_BINARY)) { |
127 | BCD_TO_BIN(sec); | 127 | sec = bcd2bin(sec); |
128 | BCD_TO_BIN(min); | 128 | min = bcd2bin(min); |
129 | BCD_TO_BIN(hour); | 129 | hour = bcd2bin(hour); |
130 | BCD_TO_BIN(day); | 130 | day = bcd2bin(day); |
131 | BCD_TO_BIN(mon); | 131 | mon = bcd2bin(mon); |
132 | BCD_TO_BIN(year); | 132 | year = bcd2bin(year); |
133 | } | 133 | } |
134 | 134 | ||
135 | if (century) { | 135 | if (century) { |
136 | BCD_TO_BIN(century); | 136 | century = bcd2bin(century); |
137 | year += century * 100; | 137 | year += century * 100; |
138 | printk(KERN_INFO "Extended CMOS year: %d\n", century * 100); | 138 | printk(KERN_INFO "Extended CMOS year: %d\n", century * 100); |
139 | } else | 139 | } else |