]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commite7ae989c78d2e98c6e33d2bafa470fb493e326c8
treeb53130e723e9d3e9e1bc1b0d3c3daea90e3b93e1
parent78bffc513e1eecde1192c446f856a67f61f555af
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