OSDN Git Service

media: pulse8-cec: print time using time64_t
authorArnd Bergmann <arnd@arndb.de>
Fri, 10 Nov 2017 16:45:54 +0000 (11:45 -0500)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 8 Dec 2017 16:08:22 +0000 (11:08 -0500)
commitcc05c0ba23bbc05d34caeb4773b89e1dfc2598b8
treeb53130e723e9d3e9e1bc1b0d3c3daea90e3b93e1
parent52cf1d964e4ca89ed80f97a8451245c9bb13a63d
media: pulse8-cec: print time using time64_t

The firmware timestamp is an unsigned 32-bit value, but we copy it into
a signed 32-bit variable, so we can theoretically get an overflow in
the calculation when the timestamp is between 2038 and 2106.

This changes the temporary variable to time64_t and changes the deprecated
time_to_tm() over to time64_to_tm() accordingly.

There is still an overflow in y2106, but that is a limitation of the
firmware interface, not a kernel problem.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/usb/pulse8-cec/pulse8-cec.c