diff options
author | Adrian Bunk <bunk@kernel.org> | 2008-10-19 03:28:41 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-20 15:52:41 (GMT) |
commit | fe20ba70abf7d6e5855c3dacc729490b3d0d077f (patch) | |
tree | 918619427cc051d22cb38b44e94c7e65f29ee928 /drivers/rtc/rtc-rs5c313.c | |
parent | 4110a0d6206bd175419cc5503f80cc296d184cbf (diff) | |
download | linux-fe20ba70abf7d6e5855c3dacc729490b3d0d077f.tar.xz |
drivers/rtc/: use bcd2bin/bin2bcd
Change drivers/rtc/ 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/rtc/rtc-rs5c313.c')
-rw-r--r-- | drivers/rtc/rtc-rs5c313.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/rtc/rtc-rs5c313.c b/drivers/rtc/rtc-rs5c313.c index 1c14d44..e6ea3f5 100644 --- a/drivers/rtc/rtc-rs5c313.c +++ b/drivers/rtc/rtc-rs5c313.c @@ -235,33 +235,33 @@ static int rs5c313_rtc_read_time(struct device *dev, struct rtc_time *tm) data = rs5c313_read_reg(RS5C313_ADDR_SEC); data |= (rs5c313_read_reg(RS5C313_ADDR_SEC10) << 4); - tm->tm_sec = BCD2BIN(data); + tm->tm_sec = bcd2bin(data); data = rs5c313_read_reg(RS5C313_ADDR_MIN); data |= (rs5c313_read_reg(RS5C313_ADDR_MIN10) << 4); - tm->tm_min = BCD2BIN(data); + tm->tm_min = bcd2bin(data); data = rs5c313_read_reg(RS5C313_ADDR_HOUR); data |= (rs5c313_read_reg(RS5C313_ADDR_HOUR10) << 4); - tm->tm_hour = BCD2BIN(data); + tm->tm_hour = bcd2bin(data); data = rs5c313_read_reg(RS5C313_ADDR_DAY); data |= (rs5c313_read_reg(RS5C313_ADDR_DAY10) << 4); - tm->tm_mday = BCD2BIN(data); + tm->tm_mday = bcd2bin(data); data = rs5c313_read_reg(RS5C313_ADDR_MON); data |= (rs5c313_read_reg(RS5C313_ADDR_MON10) << 4); - tm->tm_mon = BCD2BIN(data) - 1; + tm->tm_mon = bcd2bin(data) - 1; data = rs5c313_read_reg(RS5C313_ADDR_YEAR); data |= (rs5c313_read_reg(RS5C313_ADDR_YEAR10) << 4); - tm->tm_year = BCD2BIN(data); + tm->tm_year = bcd2bin(data); if (tm->tm_year < 70) tm->tm_year += 100; data = rs5c313_read_reg(RS5C313_ADDR_WEEK); - tm->tm_wday = BCD2BIN(data); + tm->tm_wday = bcd2bin(data); RS5C313_CEDISABLE; ndelay(700); /* CE:L */ @@ -294,31 +294,31 @@ static int rs5c313_rtc_set_time(struct device *dev, struct rtc_time *tm) } } - data = BIN2BCD(tm->tm_sec); + data = bin2bcd(tm->tm_sec); rs5c313_write_reg(RS5C313_ADDR_SEC, data); rs5c313_write_reg(RS5C313_ADDR_SEC10, (data >> 4)); - data = BIN2BCD(tm->tm_min); + data = bin2bcd(tm->tm_min); rs5c313_write_reg(RS5C313_ADDR_MIN, data ); rs5c313_write_reg(RS5C313_ADDR_MIN10, (data >> 4)); - data = BIN2BCD(tm->tm_hour); + data = bin2bcd(tm->tm_hour); rs5c313_write_reg(RS5C313_ADDR_HOUR, data); rs5c313_write_reg(RS5C313_ADDR_HOUR10, (data >> 4)); - data = BIN2BCD(tm->tm_mday); + data = bin2bcd(tm->tm_mday); rs5c313_write_reg(RS5C313_ADDR_DAY, data); rs5c313_write_reg(RS5C313_ADDR_DAY10, (data>> 4)); - data = BIN2BCD(tm->tm_mon + 1); + data = bin2bcd(tm->tm_mon + 1); rs5c313_write_reg(RS5C313_ADDR_MON, data); rs5c313_write_reg(RS5C313_ADDR_MON10, (data >> 4)); - data = BIN2BCD(tm->tm_year % 100); + data = bin2bcd(tm->tm_year % 100); rs5c313_write_reg(RS5C313_ADDR_YEAR, data); rs5c313_write_reg(RS5C313_ADDR_YEAR10, (data >> 4)); - data = BIN2BCD(tm->tm_wday); + data = bin2bcd(tm->tm_wday); rs5c313_write_reg(RS5C313_ADDR_WEEK, data); RS5C313_CEDISABLE; /* CE:H */ |