diff options
Diffstat (limited to 'arch/cris/arch-v10/drivers/pcf8563.c')
-rw-r--r-- | arch/cris/arch-v10/drivers/pcf8563.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/arch/cris/arch-v10/drivers/pcf8563.c b/arch/cris/arch-v10/drivers/pcf8563.c index 8769dc91407..1e90c1a9c84 100644 --- a/arch/cris/arch-v10/drivers/pcf8563.c +++ b/arch/cris/arch-v10/drivers/pcf8563.c | |||
@@ -122,7 +122,7 @@ get_rtc_time(struct rtc_time *tm) | |||
122 | "information is no longer guaranteed!\n", PCF8563_NAME); | 122 | "information is no longer guaranteed!\n", PCF8563_NAME); |
123 | } | 123 | } |
124 | 124 | ||
125 | tm->tm_year = BCD_TO_BIN(tm->tm_year) + | 125 | tm->tm_year = bcd2bin(tm->tm_year) + |
126 | ((tm->tm_mon & 0x80) ? 100 : 0); | 126 | ((tm->tm_mon & 0x80) ? 100 : 0); |
127 | tm->tm_sec &= 0x7F; | 127 | tm->tm_sec &= 0x7F; |
128 | tm->tm_min &= 0x7F; | 128 | tm->tm_min &= 0x7F; |
@@ -131,11 +131,11 @@ get_rtc_time(struct rtc_time *tm) | |||
131 | tm->tm_wday &= 0x07; /* Not coded in BCD. */ | 131 | tm->tm_wday &= 0x07; /* Not coded in BCD. */ |
132 | tm->tm_mon &= 0x1F; | 132 | tm->tm_mon &= 0x1F; |
133 | 133 | ||
134 | BCD_TO_BIN(tm->tm_sec); | 134 | tm->tm_sec = bcd2bin(tm->tm_sec); |
135 | BCD_TO_BIN(tm->tm_min); | 135 | tm->tm_min = bcd2bin(tm->tm_min); |
136 | BCD_TO_BIN(tm->tm_hour); | 136 | tm->tm_hour = bcd2bin(tm->tm_hour); |
137 | BCD_TO_BIN(tm->tm_mday); | 137 | tm->tm_mday = bcd2bin(tm->tm_mday); |
138 | BCD_TO_BIN(tm->tm_mon); | 138 | tm->tm_mon = bcd2bin(tm->tm_mon); |
139 | tm->tm_mon--; /* Month is 1..12 in RTC but 0..11 in linux */ | 139 | tm->tm_mon--; /* Month is 1..12 in RTC but 0..11 in linux */ |
140 | } | 140 | } |
141 | 141 | ||
@@ -282,12 +282,12 @@ int pcf8563_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, | |||
282 | century = (tm.tm_year >= 2000) ? 0x80 : 0; | 282 | century = (tm.tm_year >= 2000) ? 0x80 : 0; |
283 | tm.tm_year = tm.tm_year % 100; | 283 | tm.tm_year = tm.tm_year % 100; |
284 | 284 | ||
285 | BIN_TO_BCD(tm.tm_year); | 285 | tm.tm_year = bin2bcd(tm.tm_year); |
286 | BIN_TO_BCD(tm.tm_mon); | 286 | tm.tm_mon = bin2bcd(tm.tm_mon); |
287 | BIN_TO_BCD(tm.tm_mday); | 287 | tm.tm_mday = bin2bcd(tm.tm_mday); |
288 | BIN_TO_BCD(tm.tm_hour); | 288 | tm.tm_hour = bin2bcd(tm.tm_hour); |
289 | BIN_TO_BCD(tm.tm_min); | 289 | tm.tm_min = bin2bcd(tm.tm_min); |
290 | BIN_TO_BCD(tm.tm_sec); | 290 | tm.tm_sec = bin2bcd(tm.tm_sec); |
291 | tm.tm_mon |= century; | 291 | tm.tm_mon |= century; |
292 | 292 | ||
293 | mutex_lock(&rtc_lock); | 293 | mutex_lock(&rtc_lock); |