Skip to content

Commit e232cfd

Browse files
akpm00torvalds
authored andcommitted
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: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 357c6e6 commit e232cfd

1 file changed

Lines changed: 15 additions & 15 deletions

File tree

‎drivers/rtc/rtc-bq4802.c‎

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,14 @@ static int bq4802_read_time(struct device *dev, struct rtc_time *tm)
7171

7272
spin_unlock_irqrestore(&p->lock, flags);
7373

74-
BCD_TO_BIN(tm->tm_sec);
75-
BCD_TO_BIN(tm->tm_min);
76-
BCD_TO_BIN(tm->tm_hour);
77-
BCD_TO_BIN(tm->tm_mday);
78-
BCD_TO_BIN(tm->tm_mon);
79-
BCD_TO_BIN(tm->tm_year);
80-
BCD_TO_BIN(tm->tm_wday);
81-
BCD_TO_BIN(century);
74+
tm->tm_sec = bcd2bin(tm->tm_sec);
75+
tm->tm_min = bcd2bin(tm->tm_min);
76+
tm->tm_hour = bcd2bin(tm->tm_hour);
77+
tm->tm_mday = bcd2bin(tm->tm_mday);
78+
tm->tm_mon = bcd2bin(tm->tm_mon);
79+
tm->tm_year = bcd2bin(tm->tm_year);
80+
tm->tm_wday = bcd2bin(tm->tm_wday);
81+
century = bcd2bin(century);
8282

8383
tm->tm_year += (century * 100);
8484
tm->tm_year -= 1900;
@@ -106,13 +106,13 @@ static int bq4802_set_time(struct device *dev, struct rtc_time *tm)
106106
min = tm->tm_min;
107107
sec = tm->tm_sec;
108108

109-
BIN_TO_BCD(sec);
110-
BIN_TO_BCD(min);
111-
BIN_TO_BCD(hrs);
112-
BIN_TO_BCD(day);
113-
BIN_TO_BCD(mon);
114-
BIN_TO_BCD(yrs);
115-
BIN_TO_BCD(century);
109+
sec = bin2bcd(sec);
110+
min = bin2bcd(min);
111+
hrs = bin2bcd(hrs);
112+
day = bin2bcd(day);
113+
mon = bin2bcd(mon);
114+
yrs = bin2bcd(yrs);
115+
century = bin2bcd(century);
116116

117117
spin_lock_irqsave(&p->lock, flags);
118118

0 commit comments

Comments
 (0)