summaryrefslogtreecommitdiffstats
path: root/drivers/media/pci/ttpci
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2017-11-06 09:06:50 -0500
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-11-07 03:11:02 -0500
commitfe3652858a36bb1aa116f23258ea9cc353426566 (patch)
treeed71a37421d7461a034eebac11eabcdc26ae7643 /drivers/media/pci/ttpci
parentb3120d2cc447ee77b9d69bf4ad7b452c9adb4d39 (diff)
downloadlinux-fe3652858a36bb1aa116f23258ea9cc353426566.tar.bz2
media: av7110: avoid 2038 overflow in debug print
Using the deprecated do_gettimeofday() in print_time() will overflow in 2038 on 32-bit architectures. It'sbetter to use a structure that is safe everywhere. While we're at it, fix the missing leading zeroes on the sub-second portion. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/pci/ttpci')
-rw-r--r--drivers/media/pci/ttpci/av7110.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/pci/ttpci/av7110.c b/drivers/media/pci/ttpci/av7110.c
index f89fb23f6c57..6d415bdeef18 100644
--- a/drivers/media/pci/ttpci/av7110.c
+++ b/drivers/media/pci/ttpci/av7110.c
@@ -347,9 +347,9 @@ static int DvbDmxFilterCallback(u8 *buffer1, size_t buffer1_len,
static inline void print_time(char *s)
{
#ifdef DEBUG_TIMING
- struct timeval tv;
- do_gettimeofday(&tv);
- printk("%s: %d.%d\n", s, (int)tv.tv_sec, (int)tv.tv_usec);
+ struct timespec64 ts;
+ ktime_get_real_ts64(&ts);
+ printk("%s: %lld.%09ld\n", s, (s64)ts.tv_sec, ts.tv_nsec);
#endif
}