diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2020-04-15 19:00:45 +0200 |
---|---|---|
committer | Petr Mladek <pmladek@suse.com> | 2020-05-20 14:54:26 +0200 |
commit | 4a60f58ee00266ebee652e991954e48d060ea950 (patch) | |
tree | 732eaaa7934a4d4946406ec56cbccc229d044f59 /drivers/firmware/raspberrypi.c | |
parent | lib/vsprintf: Print time64_t in human readable format (diff) | |
download | linux-4a60f58ee00266ebee652e991954e48d060ea950.tar.xz linux-4a60f58ee00266ebee652e991954e48d060ea950.zip |
ARM: bcm2835: 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-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
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/firmware/raspberrypi.c')
-rw-r--r-- | drivers/firmware/raspberrypi.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/firmware/raspberrypi.c b/drivers/firmware/raspberrypi.c index da26a584dca0..a3e85186f8e6 100644 --- a/drivers/firmware/raspberrypi.c +++ b/drivers/firmware/raspberrypi.c @@ -182,16 +182,10 @@ rpi_firmware_print_firmware_revision(struct rpi_firmware *fw) RPI_FIRMWARE_GET_FIRMWARE_REVISION, &packet, sizeof(packet)); - if (ret == 0) { - struct tm tm; - - time64_to_tm(packet, 0, &tm); + if (ret) + return; - dev_info(fw->cl.dev, - "Attached to firmware from %04ld-%02d-%02d %02d:%02d\n", - tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, - tm.tm_hour, tm.tm_min); - } + dev_info(fw->cl.dev, "Attached to firmware from %ptT\n", &packet); } static void |