summaryrefslogtreecommitdiff
path: root/drivers/rtc/hctosys.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2018-12-04 23:23:12 +0200
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2018-12-10 22:39:37 +0100
commit5548cbf7f148b9a039b19fa4697f1b9beaba2c78 (patch)
treed061de9fb7217922bb26d9c008729d26b0d6eb93 /drivers/rtc/hctosys.c
parent4d42c44727a062e233e446c6c86da1c84d762d79 (diff)
rtc: Switch to use %ptR
Use %ptR instead of open coded variant to print content of struct rtc_time in human readable format. Note, we drop the validation option. This is only used in a deprecated ABI and is mostly wrong as many RTCs will still be valid after 2100. Cc: Arnd Bergmann <arnd@arndb.de> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc/hctosys.c')
-rw-r--r--drivers/rtc/hctosys.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/rtc/hctosys.c b/drivers/rtc/hctosys.c
index e79f2a181ad2..23efbe6949a3 100644
--- a/drivers/rtc/hctosys.c
+++ b/drivers/rtc/hctosys.c
@@ -56,12 +56,8 @@ static int __init rtc_hctosys(void)
err = do_settimeofday64(&tv64);
- dev_info(rtc->dev.parent,
- "setting system clock to "
- "%d-%02d-%02d %02d:%02d:%02d UTC (%lld)\n",
- tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday,
- tm.tm_hour, tm.tm_min, tm.tm_sec,
- (long long) tv64.tv_sec);
+ dev_info(rtc->dev.parent, "setting system clock to %ptR UTC (%lld)\n",
+ &tm, (long long)tv64.tv_sec);
err_read:
rtc_class_close(rtc);