Commit 5f1fcf8c authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Petr Mladek

usb: pulse8-cec: Switch to use %ptT

Use %ptT instead of open coded variant to print content of
time64_t type in human readable format.

Link: https://lore.kernel.org/r/20200415170046.33374-4-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: default avatarSergey Senozhatsky <sergey.senozhatsky@gmail.com>
Rewieved-by: default avatarPetr Mladek <pmladek@suse.com>
Signed-off-by: default avatarPetr Mladek <pmladek@suse.com>
parent 4a60f58e
...@@ -661,7 +661,6 @@ static int pulse8_setup(struct pulse8 *pulse8, struct serio *serio, ...@@ -661,7 +661,6 @@ static int pulse8_setup(struct pulse8 *pulse8, struct serio *serio,
u8 *data = pulse8->data + 1; u8 *data = pulse8->data + 1;
u8 cmd[2]; u8 cmd[2];
int err; int err;
struct tm tm;
time64_t date; time64_t date;
pulse8->vers = 0; pulse8->vers = 0;
...@@ -682,10 +681,7 @@ static int pulse8_setup(struct pulse8 *pulse8, struct serio *serio, ...@@ -682,10 +681,7 @@ static int pulse8_setup(struct pulse8 *pulse8, struct serio *serio,
if (err) if (err)
return err; return err;
date = (data[0] << 24) | (data[1] << 16) | (data[2] << 8) | data[3]; date = (data[0] << 24) | (data[1] << 16) | (data[2] << 8) | data[3];
time64_to_tm(date, 0, &tm); dev_info(pulse8->dev, "Firmware build date %ptT\n", &date);
dev_info(pulse8->dev, "Firmware build date %04ld.%02d.%02d %02d:%02d:%02d\n",
tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday,
tm.tm_hour, tm.tm_min, tm.tm_sec);
dev_dbg(pulse8->dev, "Persistent config:\n"); dev_dbg(pulse8->dev, "Persistent config:\n");
cmd[0] = MSGCODE_GET_AUTO_ENABLED; cmd[0] = MSGCODE_GET_AUTO_ENABLED;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment