提交 a07995be 编写于 作者: A Andy Shevchenko 提交者: Alexandre Belloni

PM: Switch to use %ptR

Use %ptR instead of open coded variant to print content of
struct rtc_time in human readable format.

Cc: linux-pm@vger.kernel.org
Acked-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com>
上级 90625444
...@@ -118,9 +118,7 @@ static unsigned int read_magic_time(void) ...@@ -118,9 +118,7 @@ static unsigned int read_magic_time(void)
unsigned int val; unsigned int val;
mc146818_get_time(&time); mc146818_get_time(&time);
pr_info("RTC time: %2d:%02d:%02d, date: %02d/%02d/%02d\n", pr_info("RTC time: %ptRt, date: %ptRd\n", &time, &time);
time.tm_hour, time.tm_min, time.tm_sec,
time.tm_mon + 1, time.tm_mday, time.tm_year % 100);
val = time.tm_year; /* 100 years */ val = time.tm_year; /* 100 years */
if (val > 100) if (val > 100)
val -= 100; val -= 100;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册