summaryrefslogtreecommitdiff
path: root/drivers/rtc/rtc-pcf2123.c
diff options
context:
space:
mode:
authorDylan Howey <Dylan.Howey@tennantco.com>2019-05-03 22:52:12 +0300
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2019-06-19 17:20:25 +0300
commitc33850bbc6c9f2276d1065b0faee2186260cb664 (patch)
treeed7d11b3167ae77f7298563e38b386e875a19ddb /drivers/rtc/rtc-pcf2123.c
parent790d033933b8a1d6bd537bdd6c08d9af745d9b78 (diff)
downloadlinux-c33850bbc6c9f2276d1065b0faee2186260cb664.tar.xz
rtc: pcf2123: use %ptR
Use %ptR to print date in human readable format. Signed-off-by: Dylan Howey <Dylan.Howey@tennantco.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc/rtc-pcf2123.c')
-rw-r--r--drivers/rtc/rtc-pcf2123.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/rtc/rtc-pcf2123.c b/drivers/rtc/rtc-pcf2123.c
index 32bfed7eefd4..2f87da47bc9a 100644
--- a/drivers/rtc/rtc-pcf2123.c
+++ b/drivers/rtc/rtc-pcf2123.c
@@ -202,11 +202,7 @@ static int pcf2123_rtc_read_time(struct device *dev, struct rtc_time *tm)
if (tm->tm_year < 70)
tm->tm_year += 100; /* assume we are in 1970...2069 */
- dev_dbg(dev, "%s: tm is secs=%d, mins=%d, hours=%d, "
- "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);
+ dev_dbg(dev, "%s: tm is %ptR\n", __func__, tm);
return 0;
}
@@ -217,11 +213,7 @@ static int pcf2123_rtc_set_time(struct device *dev, struct rtc_time *tm)
u8 txbuf[7];
int ret;
- dev_dbg(dev, "%s: tm is secs=%d, mins=%d, hours=%d, "
- "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);
+ dev_dbg(dev, "%s: tm is %ptR\n", __func__, tm);
/* Stop the counter first */
ret = regmap_write(pdata->map, PCF2123_REG_CTRL1, CTRL1_STOP);