diff options
Diffstat (limited to 'include/asm-generic/rtc.h')
-rw-r--r-- | include/asm-generic/rtc.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/include/asm-generic/rtc.h b/include/asm-generic/rtc.h index 71ef3f0b9685..89061c1a67d4 100644 --- a/include/asm-generic/rtc.h +++ b/include/asm-generic/rtc.h | |||
@@ -84,12 +84,12 @@ static inline unsigned int get_rtc_time(struct rtc_time *time) | |||
84 | 84 | ||
85 | if (!(ctrl & RTC_DM_BINARY) || RTC_ALWAYS_BCD) | 85 | if (!(ctrl & RTC_DM_BINARY) || RTC_ALWAYS_BCD) |
86 | { | 86 | { |
87 | BCD_TO_BIN(time->tm_sec); | 87 | time->tm_sec = bcd2bin(time->tm_sec); |
88 | BCD_TO_BIN(time->tm_min); | 88 | time->tm_min = bcd2bin(time->tm_min); |
89 | BCD_TO_BIN(time->tm_hour); | 89 | time->tm_hour = bcd2bin(time->tm_hour); |
90 | BCD_TO_BIN(time->tm_mday); | 90 | time->tm_mday = bcd2bin(time->tm_mday); |
91 | BCD_TO_BIN(time->tm_mon); | 91 | time->tm_mon = bcd2bin(time->tm_mon); |
92 | BCD_TO_BIN(time->tm_year); | 92 | time->tm_year = bcd2bin(time->tm_year); |
93 | } | 93 | } |
94 | 94 | ||
95 | #ifdef CONFIG_MACH_DECSTATION | 95 | #ifdef CONFIG_MACH_DECSTATION |
@@ -159,12 +159,12 @@ static inline int set_rtc_time(struct rtc_time *time) | |||
159 | 159 | ||
160 | if (!(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY) | 160 | if (!(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY) |
161 | || RTC_ALWAYS_BCD) { | 161 | || RTC_ALWAYS_BCD) { |
162 | BIN_TO_BCD(sec); | 162 | sec = bin2bcd(sec); |
163 | BIN_TO_BCD(min); | 163 | min = bin2bcd(min); |
164 | BIN_TO_BCD(hrs); | 164 | hrs = bin2bcd(hrs); |
165 | BIN_TO_BCD(day); | 165 | day = bin2bcd(day); |
166 | BIN_TO_BCD(mon); | 166 | mon = bin2bcd(mon); |
167 | BIN_TO_BCD(yrs); | 167 | yrs = bin2bcd(yrs); |
168 | } | 168 | } |
169 | 169 | ||
170 | save_control = CMOS_READ(RTC_CONTROL); | 170 | save_control = CMOS_READ(RTC_CONTROL); |