Commit e232cfdc authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

drivers/rtc/rtc-bq4802.c: don't use BIN_2_BCD and BCD_2_BIN

These are going away.

Cc: Takashi Iwai <tiwai@suse.de>
Cc: Adrian Bunk <bunk@stusta.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 357c6e63
...@@ -71,14 +71,14 @@ static int bq4802_read_time(struct device *dev, struct rtc_time *tm) ...@@ -71,14 +71,14 @@ static int bq4802_read_time(struct device *dev, struct rtc_time *tm)
spin_unlock_irqrestore(&p->lock, flags); spin_unlock_irqrestore(&p->lock, flags);
BCD_TO_BIN(tm->tm_sec); tm->tm_sec = bcd2bin(tm->tm_sec);
BCD_TO_BIN(tm->tm_min); tm->tm_min = bcd2bin(tm->tm_min);
BCD_TO_BIN(tm->tm_hour); tm->tm_hour = bcd2bin(tm->tm_hour);
BCD_TO_BIN(tm->tm_mday); tm->tm_mday = bcd2bin(tm->tm_mday);
BCD_TO_BIN(tm->tm_mon); tm->tm_mon = bcd2bin(tm->tm_mon);
BCD_TO_BIN(tm->tm_year); tm->tm_year = bcd2bin(tm->tm_year);
BCD_TO_BIN(tm->tm_wday); tm->tm_wday = bcd2bin(tm->tm_wday);
BCD_TO_BIN(century); century = bcd2bin(century);
tm->tm_year += (century * 100); tm->tm_year += (century * 100);
tm->tm_year -= 1900; tm->tm_year -= 1900;
...@@ -106,13 +106,13 @@ static int bq4802_set_time(struct device *dev, struct rtc_time *tm) ...@@ -106,13 +106,13 @@ static int bq4802_set_time(struct device *dev, struct rtc_time *tm)
min = tm->tm_min; min = tm->tm_min;
sec = tm->tm_sec; sec = tm->tm_sec;
BIN_TO_BCD(sec); sec = bin2bcd(sec);
BIN_TO_BCD(min); min = bin2bcd(min);
BIN_TO_BCD(hrs); hrs = bin2bcd(hrs);
BIN_TO_BCD(day); day = bin2bcd(day);
BIN_TO_BCD(mon); mon = bin2bcd(mon);
BIN_TO_BCD(yrs); yrs = bin2bcd(yrs);
BIN_TO_BCD(century); century = bin2bcd(century);
spin_lock_irqsave(&p->lock, flags); spin_lock_irqsave(&p->lock, flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment