From 5548cbf7f148b9a039b19fa4697f1b9beaba2c78 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Tue, 4 Dec 2018 23:23:12 +0200 Subject: 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 Acked-by: Greg Kroah-Hartman Signed-off-by: Andy Shevchenko Signed-off-by: Alexandre Belloni --- drivers/char/rtc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'drivers/char') diff --git a/drivers/char/rtc.c b/drivers/char/rtc.c index 4948c8bda6b1..0cde96822a87 100644 --- a/drivers/char/rtc.c +++ b/drivers/char/rtc.c @@ -1125,11 +1125,10 @@ static int rtc_proc_show(struct seq_file *seq, void *v) * time or for Universal Standard Time (GMT). Probably local though. */ seq_printf(seq, - "rtc_time\t: %02d:%02d:%02d\n" - "rtc_date\t: %04d-%02d-%02d\n" + "rtc_time\t: %ptRt\n" + "rtc_date\t: %ptRd\n" "rtc_epoch\t: %04lu\n", - tm.tm_hour, tm.tm_min, tm.tm_sec, - tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, epoch); + &tm, &tm, epoch); get_rtc_alm_time(&tm); -- cgit v1.2.3-59-g8ed1b