diff options
author | Adrian Bunk <bunk@kernel.org> | 2008-10-18 23:28:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-20 11:52:41 -0400 |
commit | 357c6e63590895dc87cc9300f5a1c27544ea69e8 (patch) | |
tree | 707cd1a80287e0f8f6f9d2879c322b2e71b2f995 /drivers/char/ip27-rtc.c | |
parent | fe20ba70abf7d6e5855c3dacc729490b3d0d077f (diff) |
rtc: use bcd2bin/bin2bcd
Change various rtc related code to use the new bcd2bin/bin2bcd functions
instead of the obsolete BCD_TO_BIN/BIN_TO_BCD/BCD2BIN/BIN2BCD macros.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char/ip27-rtc.c')
-rw-r--r-- | drivers/char/ip27-rtc.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/char/ip27-rtc.c b/drivers/char/ip27-rtc.c index ec9d0443d92c..2abd881b4cbc 100644 --- a/drivers/char/ip27-rtc.c +++ b/drivers/char/ip27-rtc.c | |||
@@ -130,12 +130,12 @@ static long rtc_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) | |||
130 | if (yrs >= 100) | 130 | if (yrs >= 100) |
131 | yrs -= 100; | 131 | yrs -= 100; |
132 | 132 | ||
133 | sec = BIN2BCD(sec); | 133 | sec = bin2bcd(sec); |
134 | min = BIN2BCD(min); | 134 | min = bin2bcd(min); |
135 | hrs = BIN2BCD(hrs); | 135 | hrs = bin2bcd(hrs); |
136 | day = BIN2BCD(day); | 136 | day = bin2bcd(day); |
137 | mon = BIN2BCD(mon); | 137 | mon = bin2bcd(mon); |
138 | yrs = BIN2BCD(yrs); | 138 | yrs = bin2bcd(yrs); |
139 | 139 | ||
140 | spin_lock_irq(&rtc_lock); | 140 | spin_lock_irq(&rtc_lock); |
141 | rtc->control |= M48T35_RTC_SET; | 141 | rtc->control |= M48T35_RTC_SET; |
@@ -311,12 +311,12 @@ static void get_rtc_time(struct rtc_time *rtc_tm) | |||
311 | rtc->control &= ~M48T35_RTC_READ; | 311 | rtc->control &= ~M48T35_RTC_READ; |
312 | spin_unlock_irq(&rtc_lock); | 312 | spin_unlock_irq(&rtc_lock); |
313 | 313 | ||
314 | rtc_tm->tm_sec = BCD2BIN(rtc_tm->tm_sec); | 314 | rtc_tm->tm_sec = bcd2bin(rtc_tm->tm_sec); |
315 | rtc_tm->tm_min = BCD2BIN(rtc_tm->tm_min); | 315 | rtc_tm->tm_min = bcd2bin(rtc_tm->tm_min); |
316 | rtc_tm->tm_hour = BCD2BIN(rtc_tm->tm_hour); | 316 | rtc_tm->tm_hour = bcd2bin(rtc_tm->tm_hour); |
317 | rtc_tm->tm_mday = BCD2BIN(rtc_tm->tm_mday); | 317 | rtc_tm->tm_mday = bcd2bin(rtc_tm->tm_mday); |
318 | rtc_tm->tm_mon = BCD2BIN(rtc_tm->tm_mon); | 318 | rtc_tm->tm_mon = bcd2bin(rtc_tm->tm_mon); |
319 | rtc_tm->tm_year = BCD2BIN(rtc_tm->tm_year); | 319 | rtc_tm->tm_year = bcd2bin(rtc_tm->tm_year); |
320 | 320 | ||
321 | /* | 321 | /* |
322 | * Account for differences between how the RTC uses the values | 322 | * Account for differences between how the RTC uses the values |