diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2020-04-15 20:00:46 +0300 |
---|---|---|
committer | Petr Mladek <pmladek@suse.com> | 2020-05-20 14:54:26 +0200 |
commit | 5f1fcf8c0adc94a334832a7fdf925801b8c339b4 (patch) | |
tree | dd14844699b3b72d260900f4aac92ddbb1505e2d /drivers | |
parent | 4a60f58ee00266ebee652e991954e48d060ea950 (diff) | |
download | linux-5f1fcf8c0adc94a334832a7fdf925801b8c339b4.tar.bz2 |
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.com
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Rewieved-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/usb/pulse8-cec/pulse8-cec.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/media/usb/pulse8-cec/pulse8-cec.c b/drivers/media/usb/pulse8-cec/pulse8-cec.c index 0655aa9ecf28..beae6aa12638 100644 --- a/drivers/media/usb/pulse8-cec/pulse8-cec.c +++ b/drivers/media/usb/pulse8-cec/pulse8-cec.c @@ -661,7 +661,6 @@ static int pulse8_setup(struct pulse8 *pulse8, struct serio *serio, u8 *data = pulse8->data + 1; u8 cmd[2]; int err; - struct tm tm; time64_t date; pulse8->vers = 0; @@ -682,10 +681,7 @@ static int pulse8_setup(struct pulse8 *pulse8, struct serio *serio, if (err) return err; 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 %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_info(pulse8->dev, "Firmware build date %ptT\n", &date); dev_dbg(pulse8->dev, "Persistent config:\n"); cmd[0] = MSGCODE_GET_AUTO_ENABLED; |