Skip to content

Commit 7093b8a

Browse files
Villemoesalexandrebelloni
authored andcommitted
rtc: isl12022: use %ptR
Simplify the code and make the output format consistent with other RTC drivers by standardizing on using the %ptR printf extension. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Link: https://lore.kernel.org/r/20220921114624.3250848-6-linux@rasmusvillemoes.dk Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
1 parent ca35887 commit 7093b8a

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

drivers/rtc/rtc-isl12022.c

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,7 @@ static int isl12022_rtc_read_time(struct device *dev, struct rtc_time *tm)
141141
tm->tm_mon = bcd2bin(buf[ISL12022_REG_MO] & 0x1F) - 1;
142142
tm->tm_year = bcd2bin(buf[ISL12022_REG_YR]) + 100;
143143

144-
dev_dbg(dev, "%s: secs=%d, mins=%d, hours=%d, "
145-
"mday=%d, mon=%d, year=%d, wday=%d\n",
146-
__func__,
147-
tm->tm_sec, tm->tm_min, tm->tm_hour,
148-
tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday);
144+
dev_dbg(dev, "%s: %ptR\n", __func__, tm);
149145

150146
return 0;
151147
}
@@ -158,11 +154,7 @@ static int isl12022_rtc_set_time(struct device *dev, struct rtc_time *tm)
158154
int ret;
159155
uint8_t buf[ISL12022_REG_DW + 1];
160156

161-
dev_dbg(dev, "%s: secs=%d, mins=%d, hours=%d, "
162-
"mday=%d, mon=%d, year=%d, wday=%d\n",
163-
__func__,
164-
tm->tm_sec, tm->tm_min, tm->tm_hour,
165-
tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday);
157+
dev_dbg(dev, "%s: %ptR\n", __func__, tm);
166158

167159
if (!isl12022->write_enabled) {
168160

0 commit comments

Comments
 (0)