diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2018-12-04 23:23:12 +0200 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2018-12-10 22:39:37 +0100 |
commit | 5548cbf7f148b9a039b19fa4697f1b9beaba2c78 (patch) | |
tree | d061de9fb7217922bb26d9c008729d26b0d6eb93 /drivers/char | |
parent | 4d42c44727a062e233e446c6c86da1c84d762d79 (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/char')
-rw-r--r-- | drivers/char/rtc.c | 7 |
1 files changed, 3 insertions, 4 deletions
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); |