Commit 7093b8a4 authored by Rasmus Villemoes's avatar Rasmus Villemoes Committed by Alexandre Belloni

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: default avatarRasmus Villemoes <linux@rasmusvillemoes.dk>
Link: https://lore.kernel.org/r/20220921114624.3250848-6-linux@rasmusvillemoes.dkSigned-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent ca358871
...@@ -141,11 +141,7 @@ static int isl12022_rtc_read_time(struct device *dev, struct rtc_time *tm) ...@@ -141,11 +141,7 @@ static int isl12022_rtc_read_time(struct device *dev, struct rtc_time *tm)
tm->tm_mon = bcd2bin(buf[ISL12022_REG_MO] & 0x1F) - 1; tm->tm_mon = bcd2bin(buf[ISL12022_REG_MO] & 0x1F) - 1;
tm->tm_year = bcd2bin(buf[ISL12022_REG_YR]) + 100; tm->tm_year = bcd2bin(buf[ISL12022_REG_YR]) + 100;
dev_dbg(dev, "%s: secs=%d, mins=%d, hours=%d, " dev_dbg(dev, "%s: %ptR\n", __func__, tm);
"mday=%d, mon=%d, year=%d, wday=%d\n",
__func__,
tm->tm_sec, tm->tm_min, tm->tm_hour,
tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday);
return 0; return 0;
} }
...@@ -158,11 +154,7 @@ static int isl12022_rtc_set_time(struct device *dev, struct rtc_time *tm) ...@@ -158,11 +154,7 @@ static int isl12022_rtc_set_time(struct device *dev, struct rtc_time *tm)
int ret; int ret;
uint8_t buf[ISL12022_REG_DW + 1]; uint8_t buf[ISL12022_REG_DW + 1];
dev_dbg(dev, "%s: secs=%d, mins=%d, hours=%d, " dev_dbg(dev, "%s: %ptR\n", __func__, tm);
"mday=%d, mon=%d, year=%d, wday=%d\n",
__func__,
tm->tm_sec, tm->tm_min, tm->tm_hour,
tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday);
if (!isl12022->write_enabled) { if (!isl12022->write_enabled) {
......
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