Skip to content

Commit 5f1fcf8

Browse files
andy-shevpmladek
authored andcommitted
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/[email protected] Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Hans Verkuil <[email protected]> Acked-by: Sergey Senozhatsky <[email protected]> Rewieved-by: Petr Mladek <[email protected]> Signed-off-by: Petr Mladek <[email protected]>
1 parent 4a60f58 commit 5f1fcf8

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

drivers/media/usb/pulse8-cec/pulse8-cec.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,6 @@ static int pulse8_setup(struct pulse8 *pulse8, struct serio *serio,
661661
u8 *data = pulse8->data + 1;
662662
u8 cmd[2];
663663
int err;
664-
struct tm tm;
665664
time64_t date;
666665

667666
pulse8->vers = 0;
@@ -682,10 +681,7 @@ static int pulse8_setup(struct pulse8 *pulse8, struct serio *serio,
682681
if (err)
683682
return err;
684683
date = (data[0] << 24) | (data[1] << 16) | (data[2] << 8) | data[3];
685-
time64_to_tm(date, 0, &tm);
686-
dev_info(pulse8->dev, "Firmware build date %04ld.%02d.%02d %02d:%02d:%02d\n",
687-
tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday,
688-
tm.tm_hour, tm.tm_min, tm.tm_sec);
684+
dev_info(pulse8->dev, "Firmware build date %ptT\n", &date);
689685

690686
dev_dbg(pulse8->dev, "Persistent config:\n");
691687
cmd[0] = MSGCODE_GET_AUTO_ENABLED;

0 commit comments

Comments
 (0)